LM2596 Output Load Current
It's a switching power supply, the power it dissipates is relatively low. And if you step down from 40V to 3V, the duty cycle is very low, so most losses will be on the diode, reducing the IC power even more. 

3A means that the switch inside and IC can hold it and maximum duty cycle is 100% or so. Hence, they will provide as much power as you need.