After the world war 1, countries in Europe realized that the conflict between two nation can cause a ripple effect that cause the war on larger international scale.
Building alliances, could make such conflict to happen before it became stronger. When member of alliances involved in conflicts, it would most likely be resolved through mediation with the help of other allies as mediator.
Doing this would prevent the war from happen again and make the continent more stable.