The IC itself is typically a small piece of silicon that somehow needs to be protected from and interfaced to the outside world The package not only protects the semiconductor from mechanical stresses but also from environmental stresses  keeping it out of the elements and away from potentially corrosive or damaging materials