Whoever oppresses the poor to increase his own wealth,
or gives to the rich, will only come to poverty.
Some become wealthy by taking advantage of the poor (i.e. those who do not how to or are incapable of making wealth). Some increase their wealth by knowing to whom to give and so open doors for getting even more back. Proverbs does not despise wealth but how one obtains it. Steady accumulation over time is praised; get rich quick schemes are frowned upon, especially when such schemes (as most do) depend upon taking advantage of the poor and others who cannot defend for themselves. This proverb addresses that injustice, plus the added element that goes with it, which is forming a good old boy network of the haves against the have-nots.
The ugliness of the scenario presented is that of relationships formed - both adversarial and friendly - based purely upon what one's neighbor can and cannot do for one's own financial advancement. The one who has money is a friend; the one doesn't is a sucker. In both cases the neighbors are merely means to an end. They have no other significance.
Treating both the poor and the rich like this, you will certainly end up in poverty regarding relationships. You will be impoverished spiritually. You can only end up cynical, and you die with no satisfaction. And, for that matter, you stand a good chance of dying financially impoverished. For when difficult times come, your so-called "friends" want to take advantage of you. Grow rich in relationships and you cannot really be poor.