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.
Unincorporated areas are usually fair game.