“heart...kidneys.” In the biblical world, the “heart” refers to the thoughts, not the emotions. The Hebrew placed thinking and planning in the heart, and emotions in the organs of the abdomen, the bowels, and kidneys. The Word of God points to the fact that our kidneys, bowels, and belly (or womb) are part of our mental/emotional life, not “just physical organs.” Our “gut,” including our intestines, bowels, kidneys, and stomach contain as many nerve cells as our brain, and studies are now showing that our “gut” contributes significantly to our emotional life and health. When the Bible mentions “heart” and “kidneys” it refers to the thought life (“heart”) and emotional life (“kidneys”).
[For more on the heart referring to the thought life, see commentary on Prov. 15:21. For more on kidneys referring to the emotional life, see commentary on Rev. 2:23, “kidneys.”]
“to give to each one according to his ways.” The teaching that on Judgment Day people will get what they deserve, good or bad, based on what they have done in their life is taught many times in Scripture (e.g., Job. 34:11; Ps. 62:12; Prov. 24:12; Jer. 17:10; 32:19; Ezek. 33:20; Matt. 16:27; Rom. 2:6; 1 Cor. 3:8; see commentary on Ps. 62:12).
[For more on rewards in the future and people getting what they deserve, see commentary on 2 Cor. 10:5, “good or evil.”]