It's not, it's a nationwide thing enforced by the FTC. WA and some other states have stricter laws which include pupillary distance.
https://www.ftc.gov/tips-advice/business-center/guidance/com...
https://www.ftc.gov/tips-advice/business-center/guidance/com...