Spain was fighting a losing battle against revolutions in South America. Florida was mostly a vast swampland, and, being separated from the rest of the Spanish territory, it just caused a dispersal of military manpower. Added to the U.S. however, it would make borders tidier and more defensible, largely preventing, for example, the sort of north-south pincer movement the British tried in 1814.