why is there a 'd' in fridge?

It's in there purely to reflect pronunciation. You need the 'e' at the end to indicate the pronunciation of the 'g' and if you didn't put in the 'd' you'd be suggesting that the 'i' was long rather than short, as it is in the correct pronunciation. This little orthographic fact seems to have escaped the notice of those who foolishly believe that 'kluge' is spelled 'kludge.'