Why is the AI so terrible with diplomacy in this series (at least in Rome and Medieval 2)? Half the time they're making either ridiculous demands or stupidly obvious bluffs. "Pay us an obscene amount of money or we will continue this war that we are clearly hilariously losing." Is this a case of poor programming or am I missing something?
Ego? In-universe, it could be explained as their having bad intelligence and thinking that the units you have bulldozing over their territories is all you have, period. At least in Medieval 2 there's the little widget on the bottom of your proposal (or counter-proposal) that mentions whether the offer is demanding or not.
It's an issue with the programming. Diplomacy and military AI do not "communicate" in the game. The diplomatic AI will look solely at factors like the ones on the diplomacy screen (relative power, reputation, current relations, money, etc), while military AI will look at the actual strategic map. The diplomacy AI literally cannot "see" the strategic map and see how badly it's getting trounced. This is also why the military AI will out-of-the-blue betray you even if you're allied; all it sees is "City with only one unit in the garrison, ATTACK NOW!" and doesn't even look at whether or not its an ally or neutral city.