Symbolism, Imagery, Allegory
Sigmund Freud would've had a field day with this episode…
Absalom, rebelling against his father, tries to seize power from him by conquering Jerusalem and then sleeping with the ten concubines David left behind. His wise but shady counselor, Ahithophel, spurs him into taking this action.
But is the point of this act just to do something fairly repulsive that will make David hate Absalom?
Yes. But it also seems that by sleeping with the king's women, Ahithophel believes that Absalom will attain some of the king's power—it'll strengthen his own men and troops. 2 Samuel assigns a lot of importance to this sort of kingly sexual life. There's also a moment where Ishbaal gets mad at his general Abner for sleeping with Saul's former concubine.
This is probably related to the same belief: if you're sleeping with someone the king slept with, you're taking some of the king's power (probably the real reason Ishbaal, who wants to be the king, is annoyed by this).