God really loved King David. From Walter Brueggemann’s Theology of the Old Testament:
Nonetheless, these contrasts function as countertestimony concerning the character of Yahweh. They attest that Yahweh is not a consistent God of command and sanction or, alternatively, of deed and consequence. Conversely, they attest that Yahweh is not a God who consistently forgives. There is slippage about sanctions on occasion, but the slippage always seems to work toward the advantage of David and against Saul…
Saul will lose partly because David is bold, lucky, attractive, and “destined.” Saul will lose because “forces” conspire against him. Israel, moreover, does not hesitate to assign those conspiring forces exactly to Yahweh. Thus:
• Yahweh will deceive in order to advance David (1 Sam 16: 1);
• Yahweh will counsel Samuel to listen to the people (8: 7, 9, 22), and crush Saul for the same action (1 Sam 15: 24);
• Yahweh will eliminate Saul for taking Amalekite spoil (15: 18– 21), but will disregard David’s like action (30: 19– 20);
• Yahweh will forgive David (2 Sam 12: 13), but refuse Saul’s confession (1 Sam 15: 24). Yahweh will be arbitrary in David’s favor and need justify it to none, certainly not to Saul or to Saul’s readers.