@Ghost-of-a-Duke
Why was the apple of God's eye a man who committed adultery and murder? Why wasn't the apple of God's eye a man who didn't commit adultery and murder?
As far as I know the expression
"pupil [or apple] of His eye" referred to the whole nation of Israel.
"For thus says Jehovah of hosts, After the glory He has sent Me against the nations who plunder you ; [Israel as a nation]
for he who touches you touches the pupil of His eye." (Zech. 2:8)
So you seem to be transferring the expression to the David individually.
Yes David committed and awful sin. And so did you and I. AWFUL.
Yet, you didn't read about the good shepherd forsook the 99 sheep to go rescue the 1 missing one ?
How about the Bible emphasize different angles of God's awesome character at different times? Yes, God said David was a man after His own heart.
A brother pointed out to me that on the threshing floor that David bought as a remedy for his sinning, God had the temple built. On the ground of the land David purchased as a kind of peace offering for his sinning God sovereignty had His temple built.
Brother Witness Lee pointed out to us that man's sin and repentance plus God's forgiveness results in God's building, His dwelling place.
Man's sin and repentance
+ God's forgiveness
= the building of God's dwelling place.
It is not that God despised the ones who were obedient not to commit adultery. It was that He has atonement and propitiation for those who do.
I would regard it as twisted to accuse God of showing undue favoritism to the adulterer. Rather realize that all have sinned, all have fallen short, if not in this arena in another. Only ONE is perfect - the Son of God.
So David can be cleansed from his greedy lust.
And you and I can also in Christ.
"You have heard that it was said, You shall not commit adultery.
But I say to you that everyone who looks at a woman in order to lust after her has already committed adultery with her in his heart." (Matt. 5:27,28)
Rather than chide God for showing favoritism for an unworthy one, it is better to realize that his example is for the learning of all the rest of us. All have sinned. All have come short of the glory of God. All are in need of forgiveness, cleansing, and grace to overcome sinning.