D7 in the schematic I found is parallel to the output transistors, preventing the input voltage from being much smaller than the output. This diode can be important if there is a very large capacitor or other voltage source at the output and the supply is turned off. Here the 1N4007 is likely large enough to worst case charge the filter capacitor, when an external source is connected with the supply turned off. If in doubt (very large capacitor) one could use a larger diode, or 2 in parallel (works here because it would be a high current transient that could be critical).
Charing the cap is about as bad as discharging it through the diode (+ shunt + possible fuse).