The United States's stated goal in World War I was to "make the world safe for democracy."
By the latter stages of World War I (after Russia dropped out), the war could have been seen as a war between democracies (France and Britain) and monarchies (Germany and Austria-Hungary). The war could also be seen as a war for freedom of the seas and international rights. Finally, President Wilson wanted to create a new world order that would make the world more peaceful and more democratic.
In fighting this war, the US gained no territory and got no real tangible benefits. It was fighting mainly for President Wilson's idealistic view of what the world could be.
The official stated reason for entering World War I by American leadership was to make the world a freer place. There is no doubt that American patriotism and ideals had an impact on the decision to go to war but we cannot ignore the actual incidents that also led to the decision. The US actually had no interest in entering World War I in the beginning. The American public and politicians wanted to stay out at first. We can say that the US was encouraged to enter the conflict by the developments that took place in 1914 and 1915.
The death of 120 Americans on a British ship destroyed by the Germans in 1915 and the discovery of Germany's plans to cooperate with Mexicans for American territories caused the US to enter World War I.
It was discovered that Germany was trying to get Mexico to join World War I on the side of the Germans. In return, they were promised the territories which they had lost to the US previously.
These incidents caused a shift in the view of the American public, who eventually supported the decision to enter World War I.