- Henry David Thoreau
The CCC in the US was a similar thing: paying people to build nice things in parks and such while people were going hungry. We absolutely didn't need that stuff. Coulda just given the money away to those who needed it. Though, this way, at least, we got some wonderful benefits that endure to this day—indeed, the kind of well-built, long-lasting, and nice-to-have but unnecessary infrastructure and flourishes, for the enjoyment and appreciation of all, that make one feel like one actually does live in a very-rich country—even if the resource-allocation wasn't ideal from a greatest-good-for-the-suffering perspective.
A sincere attempt at economic stimulus, or keeping the able-bodied masses busy & fed so they don't get any ideas? Probably both.
As for the true motivations of the pharaohs—who knows.