It very strongly is, because you cannot be at war with the ally of your ally. Yes, you can drop to neutral and fight, but you cannot take territory and it just gets silly. That right there has caused more problems in the last year on the FEI than I want to think about.
Honestly, that's why I don't sign any more alliances with D'Hara as I have. I know that if I lock myself in alliances, I'll be in trouble if the nobles of my realm ever demand some action. Or why I didn't seek for more alliances when I was king of RoF than I did, or why I rarely ever push to form alliances when in other positions.
Alliances have their benefits, but their drawbacks. Unless your goal is to avoid wars at all costs, and you have foreigners to back you up should rebellions brew, it's very much in the ruler's best interests to keep some possibilities of war open.
And if an old ruler was too eager to sign alliances, they are pretty easy to break anyhow.
Alliances don't prevent wars, the rulers who signed them and the panzy rulers who won't dear lower relations to peace with common allies or who can't sway his ally to lower his relations with your foe is the problem. In my experience, the "can't declare war on an ally's ally" limited the number of alliances that were agreed upon, as otherwise almost everyone would jump from peace to alliance.