Many German alliances were formed to diplomatically isolate France.
The system of forming alliances was started by the German chancellor called Bismarck from 1871 to 1890. He organized a system of alliances that were deigned to ensure the dominance of Germany on the European continent.
France was determined to challenge this because she had been defeated by Germany in 1871 and had been forced to cede two provinces to Germany. Bismarck tried to befriend Austria, Russia, Italy and Britain in order to isolate France