Apparently, this will happen just for the hell of it, because the computer has ultimate control over the game. I wiped out the Arabians and razed most of their cities, but I held onto Baghdad for whatever reason. It had a German (neighbors) revolt or two, but the first chance I got, I rushed production to build a theater to expand its borders, because the Germans were bordering it and I didn't want the city to flip or lose any resource tiles. Things were quiet for a while, its borders expanded, and I had five gunships in the city. Amazingly, in one of those moments that proves the computer cheats for the AI, the stupid city flipped to the Germans.
To see if I could change the course of this crap, I loaded the game a few turns back and rushed production of a coliseum, hoping that might make some of the stupid populace happy. Ha, not quite. Despite having a theater and coliseum, the douchebags flipped to the Germans. Come on, get real -- I captured the city and it flips to another civ? I've played Civ I, II, III, and now IV, and I've seen some big-time crap (including the desecration of armors against the likes of crap phalanxes and impis), but this is one of them that ranks up there.