The most likely answer is that they didn't. Rather, they adopted or adapted these placenames' spelling from English - specifically, from the widely translated work of Thomas Shaw, an English reverend and Oxford fellow who spent several years in Algeria in the early 1700s, a century before France occupied Algiers. He spelt the two towns' names as Jinnett and Dellys respectively - a spelling which, in English, yields the almost exactly correct pronunciations /d͡ʒɪnɛt/ and /dɛlɪs/.
Shaw's book was translated into French by 1743, and the translator retained the English spellings of both names. In a later edition no doubt prompted by the French invasion (1830), Jinnett got amended to Djinnett - someone had finally got around to noticing that English j is pronounced like French dj, not like French j. The doubled letters, useful for indicating vowel quality in English but serving no purpose in French, were lost within a decade, as seen in Eyriès (1839). But the i of Djinet, and the y of Dellys, remained to testify to a period when French geographers relied on an English traveller to tell them about Algeria - and to confirm most colonists' lack of interest in how the locals pronounced these names.