Fanbois will surely accuse of whining, but I feel your pain.
Diplomatic AI is difficult to program, so diplomacy more or less sucks in all strategy games I have encountered, behaving like a bunch of demented psychopath without long-term memory or ability to recognize common cause.
The problem is that while it's easy to program a reactive AI that spots tactical blunders in chess, shoots enemies in sight or attacks nearby threats, it's insanely difficult to impossible to program a strategic AI that could formulate and pursue long term goals.
First, you run into problems even inventing a formal language that would allow the AI to grasp such problems. Today's AIs are more or less just bunches of triggers or state machines - if enemy is here, charge, if two enemies, retreat there, etc. The problem is that such systems are not adaptive and humans soon discover methods to exploit them.
Just consider what dictates alliances and wars - first, it's the geopolitical situation. Someone who blocks your way to expansion will inevitably become your enemy, even if he's sugar sweet - you must expand, or you will be soon so small that you will be insignifficant. Next, competetion for critical resources. Control of chokepoints and strategically important landmarks (how an AI can even define that?). Next, you must be able to define your long-term goals and find out whose long-term goals can be compatible and how to proceed so that both sides benefit from the alliance. Most importantly, you must be able to analyze the ally's behavior and spot signs he is actually working against you. You must be able to design and implement safeguards that serve to limit the risk when someone betrays - demarcation lines, demiliarized zones, loot share, and so on.
Just take a piece of paper and try to sketch an algorithm that would accomplish this - no coding in specific language is necessary, just a simple flowchart. You will find that it's a very difficult task.
That's why developers in current games have to cut corners - they design some modes of behavior, but most often, the AI behaves erratically. Because humans are so much better than AIs in complex game, it's safer bet for the developers to let the AIs just bunch on the human player, providing difficulty that would have to be obtained by cheating otherwise.
Just remember, doing AI is hard. Even academic, non-game focused AI projects are surprisingly modest in what they can accomplish.