This is because when you came out of Egypt, they refused to provide you with food and water. And besides, they hired Balaam to put a curse on you.