The US entered WWI because of numerous acts of German aggression. Germany was sinking US merchant ships with unrestricted submarine warfare in violation of international law. Germany was also inciting the Mexicans to invade the Western US with a promise of arms. War between the US and Germany was inevitable since the German and US fleets stared each other down in Manila Bay in 1898.
I am in no way saying that Germany was sinless but they were not sinking US ships with irrational malice, we were supplying their enemies and those supplies were costing German lives. Would any other country, including us, do any different in a life and death struggle like that? Sure the Germans approached the Mexicans, they saw what was coming ie. direct US involvment.
There is an old saying "live by the sword die by the sword." Empires live by the sword. Germany wanted their rightful place in the sun got their come upance early on. Others should learn from history and avoid such painful mistakes but then that is not human nature individually or on a national level.