It's supposed to prevent you from going to war against eachother, same as friendship, but the AI can go to war regardless via Joint War. Other than that it's just a requirement for Defensive Pact, gives Open Borders and I think may be required for Research Agreement as well.
So, it's pretty useless, like all diplomacy in this game.