>>58771462gif is pronounced with a soft g because it's a standard english word
doge is pronounced the way it is because its inception was based on intentionally spelling things wrong despite being pronounced the normal way. Maybe mix in a bit of baby talk.
They're fundamentally different, as the former is an entirely novel word and was adopted into the language organically whereas the latter is already an existing word with an existing pronunciation that's simply been spelled wrong (on purpose, and for recognizability)