...for wisdom will come into your heart, and knowledge will be pleasant to your soul...
Proverbs 2:10
This isn't referring to general knowledge about things, but the knowledge that comes from God in v5. If anyone hates the knowledge of God, he cannot have wisdom, and therefore cannot understand righteousness, justice, or equity.