When you go to a pizza shop and order a pizza, you of course give money to obtain the pizza you want to eat. But you're not giving money because you want to give money to the pizza shop worker or the owner of the shop, the pizza is obviously the thing you want and giving money is merely the one thing you have to do to obtain the pizza. Even though you are giving money to get pizza you want to eat, giving money is not what you want and you just want the pizza but giving money is the thing you have to do to get the pizza whether you like it or not and you would rather have the pizza for free without shelling out money and you wouldn't voluntarily give the money if they were giving the pizza for free, you wouldn't voluntarily give them money for it's something you don't have to do and would rather just keep the money you don't have to shell out.
Employers have a similar mentality. They do want people to work for them but they know they can't expect people to work for them for free so they have to give money to make people willing to work for them even though giving money is something the employer doesn't want to do in the first place but still has do to get people to work for him. The employer is not paying the worker out of the generosity of his heart as you aren't paying for the pizza out of the generosity of your heart. It's merely and obligation the employer has to fulfill to get something he wants as paying for the pizza is an obligation you have to fulfill to get something you want and free voluntarily labor without having to paying is something the employer would rather have than being obligated to pay as a free pizza is something that you would rather have than being obligated to pay.