This verse answers the one before it.
Quick answer
The behavior verse 20 described is now named as sin. The verse does not merely disapprove of contempt for the poor; it files it as wrongdoing.
Read both lines
The pairing with verse 20 is the chapter's clearest example of the book correcting itself in place. One verse reports that the poor lose their neighbors; the next says that despising a neighbor is sin, which retroactively indicts everyone in the previous sentence. The second line goes further than prohibition into blessing: mercy on the poor makes a person happy, using the beatitude word. So the chapter moves from an unflattering fact about human behavior to a moral judgment on it to a commendation of the opposite, in two verses and without commentary.
Related: Proverbs 14:31 · Proverbs 19:17 · Proverbs 11:12 · Matthew 25:40
New King James Version®, Copyright © 1982, Thomas Nelson. All rights reserved. Full copyright information. Scripture provided by API.Bible.
Go Deeper
If this verse has been used to put weight on you that it was never carrying, ask about it directly.