The issue is, most code only runs so few times that it doesn't really matter. Only when the code requires so much cloud resources that it's worth to spend an engineer's salary for a few hours/days to optimize it you should do it.
Or if your software aims to be successful on end-user devices. Only because you don't pay for the electricity or the faster machines, that doesn't mean that no carbon is emitted for producing them.