Actually there is a sound economic basis for welfare, you can derive it from what's called fiscal multipliers. e.g. a dollar spent on any particular thing is going to stimulate the economy to some degree, and that's different depending on what you spend it on.
For example, tax breaks for millionaires produce 30 cents of GDP for every dollar returned. So if you tax a millionaire $1 extra, you lose 30 cents in GDP, and if you give back $1 you gain 30 cents in GDP.
However ... food stamps produce about $1.70 in GDP for every dollar spent. That's because that dollar goes through the most possible people's hands before it's saved in a bank account somewhere. So, a millionaire's big fat bank account isn't actually a very efficient form of economic stimulus. If you take a dollar from him and give it to some poor person, the overall national GDP will rise by almost $1.50.
So there's nothing fucking magical about tax breaks that makes more GDP happen. If you give back $1 in taxes, we already know how much GDP is going to be impacted by that, we have the data on that. Taxes are just negative spending and spending is just negative taxes.
The apologists for the rich like to talk about the economy like it's a zero-sum game, as if, if we stop feeding the poor then the middle class will "get their taxes back" but this is bullshit. A starving underclass is going to drive down your wages through wage competition, probably losing you more wealth than any theoretical saving. Meanwhile, crime will skyrocket due to deprivation and hunger, and they'll spend 50 times as much as welfare ever cost, locking up the starving peasants in prison.