It proabably has logic something like
If city meets criteria A, B, and C, try to build a wonder there.
Then in each wonder-building city: What available wonder is most important to me?
So the logic ends up building the same wonder in multiple cities. I originally thought it was a design flaw because they forget to see if that wonder is being built in other cities. but the more I think about it, it's probably a conscious decision by the AI designers so that the first city that completes a wonder completes the most important one without trying to project shield rates to put priority wonders in the proper cities. Once the most important wonder is built, All cities switch those shields to the next most important and the next city to complete a wonder gets the next priority, etc.
------------------
DEATH awaits you all...with nasty, big, pointy teeth.