Dushenna, the twenty-third sign of the abagada, was not always a letter. It began as a ligature: two letters, ad and aksa, written joined, and read as the syllable di. Aramaic used that syllable to write the relative pronoun and the marker of the genitive, one of the most frequent things anybody writes in the language, and a shorthand for something written that often tends to fuse.
What makes the Mandaic case interesting is that the fusion did not replace the parts. The ordinary joined sequence of ad and aksa is still written, and still read as di, beside a separate undividable sign that came from it. Two things with one origin and different jobs now sit in the same alphabet, and a reader tells them apart by shape rather than by decomposing them.
The same thing happened a second time. Kad, the sign after dushenna, began as a ligature of ak and dushenna, so it is a ligature built on a ligature, and it too became an undivided sign.
This is how alphabets in this family grow when they grow at all: not by inventing shapes, and not by borrowing them, but by promoting a habit of writing into a letter. Syriac had a comparable ligature of yudh and he and never promoted it, so the Syriac count stayed at twenty-two while the Mandaic count went past it. The difference is a decision about what to call a letter, not about what scribes actually wrote.