USA had to join the war after altercations and provocations by the Germans.
Step-by-step explanation:
America had remained neutral for almost all of the war until their trade ships began being sunk by the Germans as USA was a major supplier of arms to the nations and then their trade routes were purposefully blocked.
There was also a plan revealed in the Zimmermann note about a conspiracy to get Mexico to declare war on the USA effectively starting a home front in the war for US.
This was what led US to get involved in the war directly.