The point of production bonuses is to make the AI a difficult opponent, not to compensate for its weaknesses. It already needs production buffs to compensates for the extra unit losses it takes as a result of being poor in combat, but that's much easier to compensate for than producing the wrong thing.If the AI never gets to a point where it's producing things that advance its victory progress, it's irrelevant how big its production bonuses are. Giving it an extra 700 because you anticipate it building Chichen Itza is irrelevant if it just ploughs the excess into a one-flat-desert-tile Petra.
That's an artificial distinction you're drawing there. The production bonus is simply to allow the AI to produce more things. Whether that's to allow them to replace units, or whether that's to compensate for bad production priorities when it comes to other stuff, is completely irrelevant. After all, even if it constructs all the wrong things, having more of the "wrong" things still pushes you ahead.
The only situation where that's not true is literally the situational wonders, but when it comes to that, I think you're overstating the impact that the construction of wonders has, because wonders are limited, there simply aren't dozens of wonders available all the time. Even if an AI builds nothing but useless wonders in one city all game long, then all the other cities still benefit from the production bonus. That one city would lack infrastructure, but given that you expect the strong AI players on the map to have more cities than the player anyway, that doesn't really matter that much. And if it does, well, turn up the production bonus further.
Of course that doesn't mean that it's not a problem to have AIs be that bad in how they choose to do things, but the building priorities are in no way as important as, for example, unit combat. Simply because unless the player goes out of their way to find out what the AI is doing, they will never see just how incompetent the AI is, because production bonuses are a good way to hide it during gameplay, it's not "in your face", and the downsides of that system that aren't that severe. If the AI is bad at combat, you are reminded of it whenever you and the AI clash. Thus, those things should be priority work - but of course they're also much harder to do right.
/edit:
When it comes to buildings though, I think they partly made the system the way it is to save processing power. It would not be much of a problem to make the AI "evaluate" how useful even a situational wonder is (you'd just have to look at the effect type and if it's a yield bonus for a specific type of tile for exampe, loop through or index all city tiles and see how many tiles benefit from the effect), it would just make the process of evaluating these things a lot slower than just evaluating the fixed yields.