 Moses gave the Israelites the opportunity to pray for him, but they did not.The Midrash compared this to a king who had many children by a noble lady.The lady was undutiful to him and he decided to divorce her.