I prefer to support those businesses that can put common sense before policies when and *if* appropriate. A small child who *really* needed to go? They were just lucky he didn't pee right there on the carpet while they persistently denied him access.
Common sense is that young children have to go when they have to go
(and I say this as one of those moms who carries a plastic jar in the car just for pee emergencies...so yes, I am definitely planning ahead and know I can't expect bathroom access).
If I were working at the store, I'd much rather take the risk of cleaning pee off tile in the bathroom than the potential of having to get it out of the carpet. Not only were they in the wrong, they were taking a big chance.
I would write a letter to management as well. We really need to become more family friendly in western culture.
Oh, and by the way, my dad, who is a business consultant (and also just genius, though I don't agree with everything he says) had an interesting relevant blog post once called "rules schmules