Battery backup with single diode
When you exclude the diode and you do not provide input power to the LM1117 it will (at least potentially) experience a reverse voltage (output higher than input). The 7805 regulator can be damaged by such a situation, but I have not heard of similar effects on an LM1117. But it is still outside its normal mode of operation, so I would advise against it.