What does Psalm 38:5 mean?
Scripture does not indicate that all sickness or hardship are the direct result of personal sin. In fact, it's often the opposite—earthly struggles can have no connection to our moral choices, at all (John 9:1–3). Then again, there are times when sin brings natural consequences, along with the convicting pressure of the Holy Spirit. In this case, David realizes his physical distress resulted from his foolishness. He was wrong to disobey God (Psalm 38:1, 18). While not specified, it's possible this psalm refers to his sin with Bathsheba (2 Samuel 12:7–9).Acts of sin may seem attractive at first, but they are foolish. The sinner will eventually come to realize how unwise such choices are. David initially thought he'd concocted a smart plan to cover his sin, but he was soon reminded that his plot simply multiplied the evil he'd done (2 Samuel 11—12).
That David experienced literal, physical sores like the ones depicted here is unlikely; his references in this psalm seem to be metaphors (Psalm 38:2). Scripture often uses the analogy of sores to convey the ugliness of sin. Addressing Judah as a sinful nation, Isaiah 1:5–6 says, "Why will you still be struck down? Why will you continue to rebel? The whole head is sick, and the who heart faint. From the sole of the foot even to the head, there is no soundness in it, but bruises and sores and raw wounds; they are not pressed out or bound up or softened with oil." As David found out, the effects of sin are not pretty. They are ugly, and they hurt. Natural consequences and the Holy Spirit's conviction are a potent combination.