He asked this question twice. Absalom was his son. There was a fierce battle going on between David's men and Absalom's men. Absalom was trying to take the throne away from his father David. Yet David was very concerned about his son's safety.
Every parent is concerned about the safety of their children.
Even when the child is not doing what they are supposed to do, the parent does not want bad things to happen to the child. And parents make many rules for their children to help keep them safe. The child may not understand why the rules are made, but they should know that the rules are to help keep them safe. Even when the child is grown up and moved away from home, the parents will pray that they stay safe. Bad things can happen even to good people.