It fought a War with Spain.
Other nations might have gone to war with the United States to gain control of the Philippines because of its strategic location and raw materials.
They came under US control as an aftermath of the Spanish-American War.
The United States gained control of the Philippines in 1899. It was ceded to the United States by Spain as a result of the Spanish American War.
The U.S defeated Spain the the 1898 Spanish-Ameircan War to obtain ownership and control of the Philippines. The US then defeated Filipinos in the Philippine-American War (called Philipppine Insurrection in the US) in the early 1900's to gaincomplete control of the Philippines.
The US gained control of the Philippines as a result of its victory over Spain in the Spanish-American War, followed by putting down the Philippine Insurrection (i.e. winning the Philippine-American war).
The Spanish-American War
The US took control of Puerto Rico and the Philippines as a result of the Spanish-American War, when the US fought Spain in a short war.