Why have a letter in a word when it’s silent in pronunciation, like the b in debt?
Can anyone please clarify my uncertainty here?
In general, never trust words in the English language to be phonetic! This is largely a consequence of English being such a fast-evolving language, and importantly, owing its vocabulary to many linguistic sources: Latin, Old French, Anglo-Saxon (a.k.a. Old English), Norse, and many others.
In this case it seems we have French to thank. This etymology is given online, and explains the supposed strange pronunciation:
late 13c., dette, from O.Fr. dete, from L. debitum “thing owed”, neut. pp. of debere “to owe”, originally, “keep something away from someone”, from de- “away” (see de-) + habere “to have” (see habit). Restored spelling after c.1400.
In other words, debt comes via the Old French dete, which itself derives from classical Latin debitum. The b sound got lost due to French phonological rules/convention, and hence the French-origin pronunciation in English. Evidently, after the end of the Middle Ages in the 15th century, there was much revived interest in the classical world, and the spelling reverted to include the original b. Pronunciation, of course, stayed the same.
(Note that this sort of evolution occurred with many different English words, and occurred at the same time many new Latin words entered the English language.)