What does God want us to learn from that, and why would God say that to him?
ESV - 12 He shall be a wild donkey of a man, his hand against everyone and everyone's hand against him, and he shall dwell over against all his kinsmen.
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.
I have wondered about this myself and other things relating to Ishmael (his name having God's name in it "El", his blessings from God, etc.)
I do have an opinion that Hagar, a slave, who wouldn't have had much say as to whether she wanted to have Abraham child or not, would like to hear that her son would be wild and "free" dwelling over and against his kinsmen (just the fact that he would have people). I also wondered if someone used these terms and Hagar heard them and then God turned them around in her favor? Just like when Jesus told Nathaniel, I saw you under the fig tree...I always wondered if he was praying under the fig tree and said something like "God, do you even see me?" I don't have any scripture references to back this up, just some things that have rolled around my thoughts from time to time.