No one denies that there are better and worse ways to spend money. The point is that even just giving people money to spend is better than nothing when the economy is not operating at full capacity. Digging and filling holes isn't productive, but it gets people money so that they can go spend it, which induces those who have the capacity to provide goods or services to then do so, when people with money to spend on them were lacking beforehand. The digging and filling of holes of course can just be sidetracked, and you can just give people the money outright.
It would be better if there were specific projects available that not only let you put people to work so they can then spend money to induce others to provide good and services they have the capacity to provide but no inducement to beforehand, but also were valuable undertakings themselves and could go toward improving future economic performance on a structural level. But even if you're not doing this, when the economy is not operating at full capacity just giving people money is better than nothing.
When Trump's talked about infrastructure he's framed in both in terms of improving America's physical capital and also putting people to work.