Britain was at war with the French during this period. It was necessary to maintain a strong military presence in the area to safeguard vital supplies and farming interests. America strongly supported the French at the time and a large fleet was maintained in the Indies to interdict French merchant shipping. That fleet needed secure bases.
He was lucky to survive as yellow fever carried off a large percentage of the troops.
A brief record of the service of the 39th Foot at that time can be seen below, in the story of one soldier:
2) Probably because of the perceived racial hierarchy of the eighteenth and nineteenth centuries, few Black soldiers were promoted to positions of authority over whites, (although paradoxically their records reveal them to have been highly respected soldiers). Of the few Black soldiers to be promoted, it is clear that extensive campaign experience was one of the criteria, as the records of one Estiphania Pappin reveal.
Estiphania Pappin. Born in St. Domingo, West Indies and enlisted in the 39th Foot, (now the “Devon & Dorset Regiment”), in Malta 1st March 1808 aged 20 years. Promoted Corporal 01/02/1828. “Served in Malta 1 year, Sicily 14 months, Peninsula 3 years and was present at several engagements - Vittoria, Pyrenees, Nivelle, Nive, Garris, Orthes and Toulouse. In America 1 year, in France 3 years and New South Wales 9 months.” Discharged as a Corporal to a pension of 1s per day, 30th June 1832, at his own request. “....his conduct has been that of a particularly regular, sober, well conducted man.” On discharge he was 441/2 years old, 5’/10” tall, had grey hair, black eyes, a dark complexion - “a man of colour” - and was a labourer by trade.
Pappin Sources: WO 97/557.