Earning something is not the same as being paid for it.
A drug dealer is paid for peddling his wares. But he hasn’t earned that money. Whereas the neighbour who voluntarily maintains a community garden isn’t paid, but earns much praise.
We often confuse being paid with earning. However, there is a moral difference. To be paid is to give people what they want. To earn is to do the work that they need.