The cost is relative to the utility and worth of the device or accessory in the use case at hand. I think it's reasonable to expect an accessory to work with the correlated generation of device it's designed for, and it's up to you if the accessory is worth the price. And if it's expensive, I would hope it's quality and would last a while. But that worth is in the context of that device. There is no reasonable expectation that the same accessory will be compatible with the next generation. What is Apple more significantly altered the dimensions of the iPad? Presumably you'd be happy then, because of course you never would've even thought I it might be compatible...Oh, no, you'd still be miserable.
My Magic Keyboard still works beautifully with the generation of iPad I bought it for. It was worth the financial investment.