That hasn't stopped Georgia from trying...
https://arstechnica.com/tech-policy/2020/04/supreme-court-rules-georgia-cant-put-the-law-behind-a-paywall/
As to the NEC, it's not a law, it's a standard, developed by a private organization, and the various jurisdictions adopt it in whole or partially. You still have to pay for a copy, and it's revised frequently, so you have to keep paying. I have never found a free or accessible copy of the current version online