In the 1700s UK and Ireland, many rich people thought charity in the form of hand-outs was a bad idea and reward without labour was bad for character [1]. So some rich people who wanted to help the poor would hire them for things like building 'follies', extravagant decorative buildings and roads to nowhere. Having famine victims earn food with hard labour went about as well as you would imagine.
[1] https://www.amusingplanet.com/2017/10/irelands-famine-follie...
[1] https://en.wikipedia.org/wiki/Civilian_Conservation_Corps
[2] https://en.m.wikipedia.org/wiki/Tennessee_Valley_Authority
But of course they do, because if they didn't then they could just take the "free" money and still volunteer to do the useless work. Maybe some people like digging holes and filling them back in -- it's good exercise.
But anybody who can think of anything more productive to do with their time is then given the option to choose that instead.
This is happening in practice. There are lots of popular jobs where people will put up with anything to get the job. Game developers routinely have "crunch time" but they don't quit as a result. Some even think it's a bonus because they get to spend more time at their dream job.
But this just becomes "zomg govt so dumb pays ppl to dig holes lol, communism fail".