Our plastic packages are not just made out of plastic. The "plastic" part is epoxy resin, and it is plastic in the sense that it can be molded and formed while hot and under great pressure to define any shape.
The resin shrinks potentially tens of percents as it cools and cures in the mold and remains somewhat plastic, creeping over time in response to mechanical stress. To keep the package dimensions stable, about 50 percent of the plastic's volume is filled with silica particles, essentially quartz bits. Into the resin are also mixed optically dark pigments to keep light from affecting the chip's electrical behavior, and other stabilizing agents.
Unfortunately, silicon has piezo-sensitivity: junction voltages, betas, thresholds, and all manner of characteristics shift with mechanical stress. Even the silica particles can cause very large but very local stresses when they bear directly down onto the die's surface. The silica chunk size is about that of an individual transistor, so a random distortion of matching can occur if a particle touches a matched device. We trim our op-amps at wafer probe to as low as 10uV offset voltage, but when packaged the offset blossoms to a few times that value, and randomly. Worst, the superbly low temperature coefficient of offset or other parameters demonstrated in die form are greatly degraded by package stresses. To solve this, we attempt to trim all the parts we can after packaging, especially references. We also use various die coatings to attempt to mollify the stresses.
There is this war going on between engineers and the packages. There are a few mold compounds and die-attach epoxies called "low stress." Well, the low-stress compounds are somewhat gentler, but not by much.
A hazard is that the high temperatures of soldering can de-laminate the plastic from the leads, die attach paddle, and die. This is not too problematic for non-precise components, but de-lamination will shift the stress that the package places on the part, causing calibrations of the die to shift. We fight this by adjusting die paddle dimensions carefully so that there is enough plastic wrapping around the die paddle to anchor itself as a unit, and we sometimes put features in the die paddle and leads to help the plastic adhere. In the course of characterizing a part on its way to production release, we also subject it to a few package reliability gauntlets. Even though the package usually has little to no de-lamination, it does shift slightly when heated or cooled dramatically, the effect we call "thermal hysteresis."
The worst thing you can do is load up a package with moisture and then solder it to a board. The plastic used throughout the IC industry absorbs water from the air. Yes, really. If a part is exposed to the ambient in a humid location for several days it will absorb moisture, and when soldered the water quickly turns to steam and can, in the worst case, pressurize and crack the plastic. We experimentally expose parts to an 85% humidity atmosphere at 85C for a couple of days, then perform a solder equivalent heating. We use an ultrasonic method of visualizing delamination, then determine what moisture level the part must be handled at. The weakest packages are shipped with desiccant to keep them dry before soldering. The most robust need no accommodation at all.
The industry has got the physical reliability procedures down pretty well, but we engineers in precision work still have issues. For one, it has become clear that what the customer will perceive as long-term drift of an accurate part is mostly just variations in humidity. We have determined that our references drift only single ppms per 1000hr. when humidity is controlled, several times more than when not. We've checked competing parts with similar results (although our references don't seem to go for random walk drifting, and those of some other manufacturers do, slightly). This is verified by placing parts in ceramic packages with solder die attached. All the materials are solid, and the long-term drift is very low, even with humidity variations.
Why does the IC industry use these plastic packages? Well, they're rugged, really rugged. They keep the die and its bond wires intact throughout the handling and the soldering processes. They are chemically inert, mostly. They tolerate the stress of shrinking solder pulling their leads in all directions. They can be formed in a very wide range of shapes and lead counts. Finally, they're less expensive than any other solution by far. Our customers like that a lot.
So we're soldiering on, testing various combinations of mold compound, coatings, and die attaches. We're looking to develop plastic cavity packages, where there is a void around the die. These are expensive packages, and not widely available. Our circuit design methods and silicon processes are advancing nicely in the field of precision analog circuits, and improve those packages we must.