That's a pretty poor analogy. Some people do keep lawyers on retainer. Also, if you don't have legal representation at the point in time you're sued/charged, you're not required to represent yourself, and can still hire a lawyer.
Unions are probably closer to insurance. You can't buy insurance after you crash your car and expect them to pay out, neither can you join a union after you've been given the sack and expect representation.