What does Proverbs 16:5 mean?
Solomon points out that God has a special distaste for the sin of arrogance. It's true that a self-aggrandizing person, who thinks too much of themselves, is guilty of the sin of pride (Proverbs 6:16–19). In this context, the "arrogance" being exhibited is spiritual. This is the kind of egotism which leads a person to sneer at the idea of God and His goodness (Psalm 10:4–6). That attitude, left unchecked, is absolutely guaranteed to lead a person away from God and into eternal consequences.An arrogant person misplaces his confidence. Instead of trusting in the Lord for salvation, he proudly trusts in his own ability to save himself. In his superiority, he feels his virtuous deeds are sufficient to gain heaven. He is like the Pharisee whose prayer in the temple exuded pride. He "thanked" God by bragging that he was better than other men, including a humble tax collector. He told God he fasted twice a week and tithed on everything he got (Luke 18:11–12). Jesus said the Pharisee did not return home justified. He remarked: "For everyone who exalts himself will be humbled" (Luke 18:14).
Ephesians 2:8–9 acknowledges that God doesn't grant salvation as payment for religious works. Instead, He offers it freely to those who accept grace through faith. That same passage explicitly points out that one cannot be "proud" of their salvation, for that reason. Romans 4:5 declares: "And to the one who does not work but believes in him who justifies the ungodly, his faith is counted as righteousness."