The economic consideration comes down to the real value of the labor, and that depends heavily on the economic benefits of specialization.
A day of you doling out soup to people or picking up trash won't be worth any more than what someone who does it for a living is paid. And it will probably be substantially less because you're not practiced at it.
A day of you building houses (assuming you have no training) could very well be negative if someone has to come along and fix your work later.
A day of a non-profit employee's work should be worth at least what their salary suggests. (They're chronically underpaid because of the conventional wisdom that high wages are a red flag. This is patently insane and unfair.)
A day of you working closely to your profession is probably worth something similarly close to your salary.
Now, if no one is picking up trash and you want it picked up, then by all means go pick it up.
But otherwise, if in other contexts it'd be a waste of your time, it's still a waste of your time when donating, so consider donating money.
That raises the question: why do so many non-profits have all these worthless volunteer activities?
First, they do tend to focus on young people whose labor isn't worth much to begin with, so they're not losing as much.
And many volunteer efforts simply need a lot of warm bodies. There's no way to canvass for votes, for instance, without having a horde of people knocking on doors.
And I suspect many volunteer activities are also a great way to raise publicity and connect with donors.