The 7805 is a series stabilized power supply with high power consumption.
The LM2596 is a switching regulated power supply with much less power consumption.
When the current is less than 50mA, 7805 is used, after all, the switching power supply circuit is complex, requiring auxiliary components such as inductors and secondary tubes.