Being such a far off colony of Spain that, to my knowledge, was very undeveloped, what did Spain gain by holding on to them as a colony? since it was the only Spanish colony in the area it seems like it did not offer any power projection bonus was it very profitable like Indonesia for the dutch?
/u/Morritz
Repost an old answer
Philippines (effectively Manila and its environs in the 16-17th century) gave them access to the China trade, which had many lucrative goods such as spices, sandalwood, silk, porcelain; not to mention trade with the spice islands and beyond. This was such an important part of the trade system of the Spanish Empire that for centuries they sent Manila Galleons regularly, off the west coast of New Spain or the Viceroyalty of Peru. From the west coast of New Spain (today's Mexico) they would carry the cargo over land to the east coast, to complete the connection back to Spain. A large portion of the silver mined in the Americas made its way to Manila, where they were traded for even higher-value goods.
Recall that Spain and Portugal were bound by the Treaty of Tordesillas, so the Spanish had to sail westward and travel through the Americas to get to the Pacific and finally the Philippines. It is also their only direct access -- meaning without going through intermediaries -- to the east Indies, as all other parts were to be the domain of the Portuguese.
Further, as Spain faced increasing competition from their rivals the English, Dutch, French in the Atlantic world, their Pacific route was inaccessible to these rivals until much later.
For a long time in the early period of the European age of exploration, there was significant demand for silver in China. So the Spanish silver mines, sending some of their silver west to Manila, provided a great way to trade with goods desirable in Europe, in essence increasing the value of their trade goods.
http://www.metmuseum.org/toah/hd/mgtr/hd_mgtr.htm
http://repository.library.csuci.edu/bitstream/handle/10139/37/TBManilaGalleons.pdf