It hasn't always worked like that. In earlier games, if another civ built your wonder, you could switch to building something else and retain like 75% of production (don't remember the exact numbers). That meant you didn't lose a massive amount of production in one of your most important cities for no good reason.
(I should say: it's been a while since I played the earlier Civ's, but I'm fairly certain this is how it worked. It's certainly works this way in Alpha Centauri, the best game in the series!)
In Civ 2 at least, if you switched to another wonder you'd keep -all- your production so you could just shrug and switch to another wonder without losing anything. It's only if you switched to a normal building or a unit that you'd lose 50% of the production.
(I should say: it's been a while since I played the earlier Civ's, but I'm fairly certain this is how it worked. It's certainly works this way in Alpha Centauri, the best game in the series!)