The story
Spelled as such around the early 20th century to avoid confusion with Spanish J, which the modern Spanish pronunciation is /h/. The spelling of "Badjao" emerged to ensure English J is pronounced as /d͡ʒ/.
Etymology from Wiktionary, CC BY-SA 4.0.