2. Electrical devices can be "factory-sealed" or "locked-out" by the manufacturer or owner using a plastic tie or a small padlock that runs through one or both of the prong holes. Construction projects or industrial safety requirements may require this type of sealing. For example, a manufacturer might apply a plastic band through the hole and attach it to a tag that says, "You must do blah blah blah before plugging in this device." The user cannot plug in the device without removing the tag, so the user is sure to see the instructions.
3. There also is a small savings in raw materials (metal) for the manufacturer of the actual plug prong. Every little bit helps!
It has been reported that really old outlets used captive ball bearings and coil springs for the detent, but today it is done with a bump and springy copper contacts.
https://home.howstuffworks.com/two-flat-prong-plug-holes.htm