Q. In our lab parts, the MPS-A20's come in plastic cases, but the 2N3431's come in metal ones. Why is this?
A. The 2N3431 is an older transistor type, and at first all transistors were produced with metal cases. After awhile, plastic cases were developed. They are less expensive and much easier to manufacture.
The same is true for integrated circuits. High-quality ICs come in ceramic packages, while less expensive ones come in plastic.