Doesn't the concept of welfare contradict the absolute of the "greater good"

I was talking to a fairly sterotyped liberal the other day and he was continually talking about the “greater good” and how the government was there to provide for this most divine of concepts and he continuosly used phrases like “for the good of the many at the expense of the few instead of at the expense of the many for the good of the few” this seems like a common position for liberals, but almost all, if not all, liberals propose both the practice of welfare and the expense of personal economic liberties for the greater good and simaler phrases as those above.

But, so long as those on welfare are the minority doesn’t this directly contradict this statement and work for the few welfare recipients at the larger whole? Doesn’t this mean that programs such as medicare and welfare work against the greater proportion of the productive population? Doesn’t this mean that all liberals by their adoration of the “greater good” must logically turn to marxism or whatever they believe will bring prosperity, not just focusing on small groups?

Are their any defences to this argument which I am missing?

You need to push that the market is the only hope for the poor man.

And that in a way, we are all poor, particularly by comparing between modern men and kings of old.