That has puzzled me on a number of occassions.

For example Cathage (the capital city of Cathage) has been captured by the Scipii in my campaign.

I laid waste its entire happiness and order infrastructure with assassins so that its loyalty was literally 0%. But it flatly refused to revolt.

I then took it with my Egyptian Army and despite extermination found that it was still on only 65% loyalty and it revolted next turn.

Now, I would have expected it to revert to Cathage after all it was an occupied city, but instead I got kicked out the the Scipii gained a free army.

Somehow that doesn't seem right, at the very least I would have expected it to go rebel.