A wedding is a private party. Hypothetically, if the Happy Couple felt that strongly about an absurd rule, they could turn people away at the door for not adhering to it. There is no 'right' of anyone to enter if the couple don't want people there who don't follow a certain requirement.
We all agree that the rule is ridiculous. There seems to be a unanimous consensus on this. Why there appears to be some disagreement over whether some would decline or some would go anyway but wear heels regardless of the request is because we don't know how strongly the couple feel about the 'no heels' rule. To put a spin on it, to those who say they would go and wear heels anyway, what if you had (hypothetically) heard that the rule was really important to the couple and that it would really upset them to see guests taller than them? Would you still go and wear heels? Would you go and wear flats or would you decline?
If I sincerely hand on my heart knew that something would upset someone (however irrational and stupid I thought the request was), I would adhere to it to attend a wedding I wanted to go to. If I felt so strongly that the absurdity should not be tolerated or it was an expense/burden/huge detriment to myself or my proximity to the couple didn't outweigh my desire to wear what I wanted, I just simply wouldn't go. And that isn't just specific to this wedding situation, it goes for all walks of life.
I'm guessing the disagreement in this thread is because we don't really know how set in stone this rule is. It could merely be a preference or something that's really important to the couple. I think it would be sensible for a guest to ask around and thus gauge the seriousness of the request beforehand. If I wasn't sure beforehand, myself personally would always take the safe (and just to be nice for the sake of being nice! because flats to heels isn't such a huge deal to *me* option) rather than defect as my default option. If the couple wasn't so close to me and I would really be uncomfortable in flats, I just wouldn't go.
You can still think something is ridiculous and still be okay with adhering to it (obv unless it is immoral, illegal etc.. etc..) They're not mutually exclusive emotions. If it *is* important to you to wear heels as you don't feel happy or comfortable in flats, then why not simply politely ask the happy couple beforehand for guidance? You can never go wrong in life by asking if you are unsure.