That’s a great question.
A mold retainer is another possible use. The majority of plugs are injection-molded assemblies. The prongs must stick out of the mold. The holes will provide a positive retention for them, so they don’t slip and cause a bad molding.
Another possible use that I’ve seen is as a lockout, e.g. To prevent the device from being plugged in or activated by someone else, thread a rod, wire or bolt through the holes.
A quick internet search will reveal all.
They match bumps on the contacts of the outlet receptacle to help retain the plug and improve the contact. It acts as a detent because the contacts are springy.