My issue with that as a player is that changing the rule or ruling after the fact invalidates what happened in play at that moment. Put another way, anything that happens in play should, given the same circumstances and-or luck, be able to happen again in that same campaign.
And so as a DM I try not to let this happen within a campaign. Or, if I'm going to change something I'll make sure there's a valid in-fiction reason behind it, and if I can't then ideally that change gets put on hold until the next time I start a campaign.
Example: there's a particular spell in my current game I'd really like to get rid of, but a whole bunch of assorted PC casters over the years have already learned it and used it. I can't just take it away from them. All I can do is make sure it's not on the spell list if-when I ever start another campaign.