David is sad because he has to leave his palace. But according to these verses, it is mainly the people’s reaction that hurts King David. His enemies suggest that David is now in the same position as his predecessor Saul, who was forsaken by God. Thus, there was a rumour that God had withdrawn from him,1 that the Lord was no longer helping him.
1 O LORD, how many are my foes! Many are rising against me;