God prepared David for the tasks he would have to perform as the king of his people. He does the same with us.