Answer:
Germany entered World War I because it was an official ally of Austria-Hungary, which had declared war on Serbia after a Serbian nationalist shot the heir to the throne of Austria-Hungary. Germany's allies were Austria-Hungary, the Ottoman Empire, and Bulgaria.