An interesting question.
The answer involves folks who cooperate and communicate with each other.
Those folks are NEMA(National Electrical Manufacturers Association), UL(Underwriters Laboratories), NFPA(National Fire Protection Association) which publishes the NEC(National electrical Code[NFPA 70]) and various governments.
So in essence(AIUI) the manufacturers make their standards(NEMA), UL tests their devices and 'approves' those devices for their intended purpose, NFPA publishes the NEC(NFPA 70) which includes references to NEMA and UL standards etc. and governments adopt the NEC either verbatim or modified for local use as their version.
It is at that point this stuff becomes LAW.
Since the NEC is 'updated' every three years, local codes(LAW) may lag those updates.
The kicker is that common safe practice becomes defined as those codes. Hence any deviation is considered negligent and places others at risk.
Is anything simple anymore?