Before the Guano Islands Act, islands without permanent residents were considered to be _terra nullius_, or "nobody's land". As such, any country could claim them by simply occupying them. However, the Guano Islands Act allowed the United States to claim and annex islands that contained significant amounts of guano, even if they were already occupied by other nations.
This proved to be a very advantageous law for the United States, as it allowed the country to quickly acquire a number of valuable territories in the Pacific and Caribbean regions. These islands provided the United States with access to important resources, including guano for fertilizer and other minerals, as well as strategic military locations.
The Guano Islands Act remained in effect until 1912, when it was replaced by the Naval Defense Sea Areas Act. This act prohibited the United States from claiming islands for their guano resources, but it did allow the United States to claim islands for their strategic military value.