I read somewhere that Taiwan was first seen (by Westerners) by the Portuguese, who referred to it as "Ilha Formosa." But the Portuguese never colonized the island - their competitors did. Why did their name stick?
It means beautiful island. Much of the island is heavily forested mountains, so it's still an appropriate name.
The two Europeans countries that colonized Taiwan have a connection to the name. A Dutch navigating officer was employed by the Portuguese and recorded the name. Formosa was "so euphonious [pleasing to the ear] and yet appropriate [it] replaced all others in European literature.” The Spanish word for beautiful is quite similar: hermosa
Source: The island of Formosa, past and present... by James W. Davidson.