In one of the other threads here (I think it was one referring to difficulty rating differences) someone posted something they found in one of the AI controlling files. Apparently, there is a function in the game files where if the human player is at peace with all AI factions for more than a certain number of turns, one will automatically go to war with him. If I remember correctly, it was 20 turns on easy, 10 turns on medium and 4 turns on hard/very hard. That could explain why alliances get betrayed.
Edit- Yes, it was the battlefield difficulty test results thread. Here's Bob the Insane's post on the subject:
https://forums.totalwar.org/vb/showp...1&postcount=13
Bookmarks