It could be that it is a sly way of telling someone they are cheap while appearing to say that friends are more important than money. Sort of like “may you live in interesting times” was a Chinese curse presented as a blessing, or the usage of “bless your heart” sometimes in the South.
In the South this was expressed as “Nothing wrong with being poor, as long as you have lots of friends”.
This is academic since I’m retired & can say that I do know where my next meal is coming from.