It would appear that God knew something about the attitude of Balaam’s heart that we do not. Balaam was clearly told he could not go to curse these people because they had been blessed. Yet, when presented with more tempting offers, Balaam asked again to see if God might reconsider. Perhaps God allowed Balaam to go so that he could show his displeasure for Balaam’s craving. The Bible later says that Balaam (loved the wages of wickedness–2 Peter 2:15).
–The Quest Study Bible