The story
Doubt arrived from Old French douter ("to doubt, to fear") and in Middle English it was written douten for the verb and doute for the noun — no B anywhere. French had lost the B of its Latin ancestor centuries earlier.
That ancestor is Latin dubitare, "to be uncertain". Early modern spelling reformers, keen to make English look as learned as Latin, slipped the B back into the English spelling: doute became doubt. It is the same move that turned dette into debt.
The pronunciation was never touched. The B has been silent in English for as long as the word has existed; only the spelling was "restored". The vowel did change on its own schedule: the long "oo" of Middle English doute became the "ow" of out in the Great Vowel Shift — the same change that turned hous into house.
