Okay, so rules in The 500 Hats are absurd and their enforcement even more so. We don't have to stop there, though. Here are couple ways to think about it, but remember, no list is exhaustive:
(1) The 500 Hats tries to bring balance to children's stories. Remember, Seuss created the fun-loving Cat in the Hat to counter the humdrum and boredom he found in the Dick and Jane primers. In the same way, The 500 Hats seems to point out the absurdity of rules and authority to bring balance to all those other children novels spouting how fabulous their rules and regulations are.
(2) The novel might just be criticizing the idea of authority by way of monarchy. As Donald E. Pease notes, "[t]he King demands that Bartholomew removes his hat because his authority is founded upon this public sign of respect [as] doing so produces the social recognition of the King's power" and "[t]he fact that Bartholomew cannot remove his hat endows him with a power that in a sense exceeds the King's" (source).
The monarch's authority is not based on merit, intelligence, accomplishments, or anything like that. It's based solely on social rules that says there is a monarch and he should be treated a certain way. There's nothing, let's say, physical about monarchy; the idea is social fantasy. So when Bartholomew disobeys these rules, even unintentionally, he isn't just showing disrespect; he's showing how unreal a King's power really is. Oops. Of course, this reading can extend to other forms of authority given where merit, intelligence, and accomplishment aren't necessarily at work.
Both of these readings get some more lovin' in Seuss's sequel, Bartholomew and the Oobleck. In Bartholomew 2.0, Bartholomew has become Derwin's page, and once again, Bartholomew starts the story bound to the same stupid societal rules that he encountered in The 500 Hats. But unlike The 500 Hats, Bartholomew finds his voice in the sequel, breaks the rules, and gains an authority he's worthy of. (In fact, to really get what either of the Bartholomew books are about, you should probably read 'em both.)
When it comes down to it, not all the rules can be winners, right? So we might as well learn to laugh—and then do away with—the ones that make us silly when we follow them.