It's legal, since they aren't under any obligation to provide their water to you for free, and you should have given this "free" service that youb were apparently using every day without paying for it a thought.
But this is the kind of attitude that monopolistic utilities have, since they know you have no choice about who to patronize. If I were you I'd go to their offices in person (so they can see your injury for themselves) and work this out, and maybe they'll agree to waive the turnoff/on fees, or at aleast defer them til next month, since their sue of the wrong zip code was their fault.
Avvo doesn't pay us for these responses, and I'm not your lawyer just because I answer this question or respond to any follow-up comments. If you want to hire me, please contact me. Otherwise, please don't expect a further response. We need an actual written agreement to form an attorney-client relationship. I'm only licensed in CA and you shouldn't rely on this answer, since each state has different laws, each situation is fact specific, and it's impossible to evaluate a legal problem without a comprehensive consultation and review of all the facts and documents at issue.