2 Samuel 15:16

And the king went forth, and all his household after him. And the king left ten women, which were concubines, to keep the house.

David went out from Jerusalem as a fugitive king unseated by the rebellion of his son Absalom, taking his whole household with him on the march. Ten concubines were left behind in the city to have charge of the house during his absence. The departure was made in haste under threatening danger. Absalom's men were in pursuit of David and those who fled with him.