The pattern the OP notices is more widespread than just the two texts quoted. here is a greater sample:
- Matt 23:23 - Justice ; Mercy ; Faithfulness
- Micah 6:8 - Act justly ; Love mercy ; Walk humbly before God
- Jer 7:3-6 - Deal justly ; Do not oppress the alien, widow, etc ; Don’t follow other gods
- Jer 9:24 - Justice ; kindness ; Righteousness
- James 1:26, 27 - -- ; Care for orphans ; Unpolluted by world
- Isa 58:3-14 - Loose chains of injustice ; Share food & clothes ; Keep Sabbath
- Zech 7:4-14 - Administer true justice ; Show mercy and compassion, do not oppress widows, orphans, alien, and poor ; Listen to the Word of the Lord
- Psalm 112 - V5: Good will come to him…who conducts his affairs with justice ; V9: He has scattered abroad his gifts to the poor ; V1: Blessed is the man who fears the Lord
Note the same three trio of virtues is consistently repeated as summarizing the whole duty of mankind.
The answer to the question, "Is only God righteous" is obviously yes simply because, no one else is righteous according to Rom 3:10-18 - no one righteous, no not one! We must seek the righteousness of God, Rom 1:17, 3:5, 10:3, 2 Cor 5:21, 2 Peter 1:1, etc.
This pattern of a righteous God is taken directly from the OT: Ps 4:1, 7:9, Zech 8:8, Isa 45:21, Prov 21:12, etc. The whole passage of Rom 3:10-18 is a series of quotes from the OT such as Ps 14:1-7, 53:1-6, Isa 59:1-17, Ps 5:9, 140:3, 10:7, 36:1 which together mean that man is unrighteous and only God is righteous.