7805 can deliver 1.5 A but pic need between from 2mA to 15mA
Can is the key word. Loads only take the current then need, as long as the voltage is correct.
You house supply is probably rated from 100 to 200A, but eg. a 10W lamp draws a fraction of an amp.
Likewise things in a car, running from a battery that can supply eg. 600A or more.
Having the correct voltage and adequate current available is all that matters.
A more efficient way would be a small buck regulator module; they are very cheap and very efficient.
At eg. 100mA, the 7805 on a 24V supply has 19V across it and would be dissipating 1.9W; it would need a heatsink.
A switching regulator (such as buck converter) "translates" power, with a small inefficiency.
The input current at 24V would be a bit over 1/5th of the output current.
Examples - this style is readily available from many suppliers:
Find many great new & used options and get the best deals for Buck Converter LM2596 Step Down DC-DC Adjustable Power Supply Voltage Regulator at the best online prices at eBay! Free delivery for many products.
www.ebay.co.uk
RUNCCI-YUN 8pcs LM2596 DC-DC Buck Converter High Efficiency Voltage Regulator 3.2-46V to 1.25-35V 3A Adjustable Power Supply Module: Amazon.co.uk: Business, Industry & Science
www.amazon.co.uk
Just be sure to adjust the output to 5V before connecting it to the 5V devices - the output voltage setting could be anything, as you receive them.