They are most likely referring to many/most counties require a grid connection for the home to be considered "habitable". Refusing and living in a un-habitable home can have all sorts of fun consequences up to and including the seizure of your own children by the state.
Every other home in the US isn't up to code. The code changes over time and governs all kinds of mundane things that you as a homeowner don't pay attention to (and shouldn't be forced to). Not being compliant doesn't make a home illegal to live in.
This is different. Many municipalities specifically require all dwellings to have basic utilities (water, sewer, electricity, garbage service), even if you're not using them. Not having that will get you in trouble pretty quickly.