As I contemplated this question, I believe the answer is that God loves the “response” of some more than others.
Like parents and children, one child might do as directed most of the time while the other doesn’t. It’s not that parents love the obedient child more than the other; however, they love the obedient child’s response more than the disobedient response. The obedient response shows a desire to please the parents by doing as told. (love)
In Scripture, we learn Jesus died for all the world and that God shows no partiality. Scripture also tells us to love God with all our heart, soul, mind, and strength, and we find Jesus said; if we love Him, we will keep His commandments.
David was considered a man after God’s heart; why? God tells us: “He will do my will” Saul, on the other hand, lost his kingdom for doing “his own” will, not God’s.
King David made many huge mistakes and was far from perfect, yet he constantly turned to and relied on God; David pursued righteousness. (doing God’s will mattered to David)
We all have the same choice!
Follow God’s will to the best of our ability by studying and following the commands and examples of Scripture or following our feelings, our ideas, or those of others.
When we choose to follow God according to His will, we spend our lives pursuing righteousness. In James chapter 5, we find the effective prayer of a righteous man can accomplish much. This should be one of our goals, to have our prayers accomplish much because our hearts are where King David’s was, pursuing righteousness.
John 3:16 tells us: “For God so loved the world, that he gave his only Son, that whoever believes in him should not perish but have eternal life.”
“So Peter opened his mouth and said: “Truly I understand that God shows no partiality, but in every nation, anyone who fears him and does what is right is acceptable to him.” Act 10:34-35
“And when he had removed him, he raised up David to be their king, of whom he testified and said, ‘I have found in David the son of Jesse a man after my heart, who will do all my will.’” Acts 13:22 ESV
But now your kingdom shall not continue. The LORD has sought out a man after his own heart, and the LORD has commanded him to be prince over his people because you have not kept what the LORD commanded you.” Samuel 13:14
“Therefore, confess your sins to one another, and pray for one another so that you may be healed. The effective prayer of a righteous man can accomplish much.” James 5:16 NASB