I agree OP was unlucky and can understand why he felt peeved but frankly he hasn't got a legitimate grievance against BA. How would the complaint read?- "my carry-on was over the size limit but not by a lot so please can you give me some avios and discipline the member of staff?"
That said, aren't airlines a pain in the ar$e for stipulating different shapes and sizes? To avoid falling into the OP's trap you'd need to study the dimensions allowed by each airline and have a suite of carry-ons at home. I write as someone who can wait for a pot of tea to brew but I can't waste my life searching airline websites for the small print then getting out a tape measure. I have one decent-sized carry-on, I've never measured it and I haven't a clue which airlines do/do not deem it ok. Maybe I've been lucky not to be challenged, or maybe I was lucky in happening to buy one that fits most airlines. But an industry norm would make life simpler for travellers.