We're in the key of, say, B major, and we need a B augmented chord. That means the 5th of B needs sharpening. Thus, F# now becomes Fx (F##). Yes, on a lot of (12edo) instruments, it's the same note, same place as G. But note (sic) that there's no G nat. diatonically in key B, and that's not the note that gets changed anyway - it's F#. In any case, writing Gnat. would still incur an extra accidental, so why not do it correctly?
You quote writing an E note in the key of D, instead of Dx. In D, it would be very rare to need to double sharp a D note. Generally, a double sharp is used when an already sharpened note needs to go up a semitone - and still retain its original letter name - so it would make sense when talking about the interval it makes with preceding and succeeding notes.