Matthew 5:6 (LDGNT)
6μακάριοι οἱ πεινῶντες καὶ διψῶντες τὴν δικαιοσύνην ὅτι αὐτοὶ χορτασθήσονται
Notation from the Faithlife Study Bible.
5:6 ones who hunger and thirst for righteousness A metaphor for moral uprightness. This may be an allusion to Psa 37:12–17 (compare note on Matt 5:5), which speaks of a time when oppressors will be no more. This line expresses a deep desire both for personal righteousness and for a world characterized by God’s righteousness (or justice).
This phrase has no exact OT parallel, but Job 15:16 contains the reverse: “one who is abominable and corrupt, a man who drinks injustice like water.” It implies that those who observe God’s commandments should do so not out of resignation, but out of a fundamental desire. Due to widespread poverty, many of those listening to Jesus were probably hungry and thirsty in a literal sense.
Barry, J. D., Mangum, D., Brown, D. R., Heiser, M. S., Custis, M., Ritzema, E., … Bomar, D. (2012, 2016). Faithlife Study Bible (Mt 5:6). Bellingham, WA: Lexham Press.