Back voltage on voltage regulators
The problem of applying an external voltage to the output pin of an NPN-output type regulator is that this would apply a reverse bias to the emitter-base junction of the NPN. The emitter-base junction of a BJT typically has a very small breakdown voltage (the emitter is heavily doped).

In the datasheet you might find this:


However, two considerations should be drawn:


You'll have a reverse current to the input, and this might cause some problems.
The datasheet states that the limit voltage is 7V. In a 7808 (or higher voltage, eg 7812), this would actually be a problem, as you would likely be applying 8V or more. However, in your case, you're likely to externally apply only 5V to the output (otherwise a larger voltage would possibly destroy the circuitry the 7805 is normally powering).


Therefore you might not need to insert the diode on a 7805.