2N2222A Mismatch between emitter and collector
There really isn't a single '2N2222' transistor, since each manufacturer just seems to use XYZ_2N2222 as a part number for a generic 'NPN silicon amplifier transistor'.

Hence the 2N2222 pin-out is sadly not standardized. Most 2N2222s have the orientation which your diagram shows, where if the flat side is facing you, the pins are E-B-C respectively. However, some manufacturers have the pins going C-B-E for the TO-92 package. For example, the ON Semi P2N2222A variant:
datasheet