I'm taking this dvar Torah from Reachings by Rabbi Yaacov Haber.
A Heart of Understanding
Balak, the King of Moab, wanted to battle the Children of Israel. But instead of using the conventional method of battle, he decided to seek the assistance of the well-known Midianite sorcerer, Bilaam, who had a reputation of success for being able to curse or bless anyone. So Balak sought Bilaam in order to have him curse the Jewish People.
The elders of Moab and Midian, versed in occult arts, went to Bilaam, conveying him Balak's message. "Spend the night here," he replied to them, "and when God speaks to me, I will be able to give you an answer." ...God said to Bilaam, "Do not go with them. Do not curse them [the Jewish People], because it is a blessed nation." When Bilaam got up in the morning, he said to Balak's dignitaries, "Go home. God refuses to let me go with you." (Numbers 22:7-8, 12-13)
Interestingly, Bilaam was approached by "the elders of Moab and Midian", but in the morning he spoke only to Balak's Moabite dignitaries. What happened to the elders of Midian?
The Talmud (Sanhedrin 105a) tells us that as soon as the elders of Midian heard that Bilaam was going to ask God first, they immediately left. They said, "There is no father that hates his son." They were already aware of the relationship God had with the Children of Israel, and realized that Balak's cause was lost.
The question we must ask is, if the elders of Midian were somehow aware of the love God has for the Jews, why then was Bilaam, a prophet, not aware?
The answer is that Bilaam, and the rest of us for that matter, are only aware of what we want to be aware of. Bilaam, in addition to being a sorcerer, was a prophet, and in fact clearly communicated with God, yet he was blind to the facts because he had to desire to know them.
Even after God replied to him and told his that he could not curse the people, he returned to ask Him again, and even after his ass had spoken to him, and after his own mouth had, in spite of himself, uttered a blessing instead of a curse (twice!) - he still did not seem to grasp that it was not God's will for him to curse the people of Israel.
In our prayers we ask God to give us a "heart of understanding." Although the heart is the source of emotion and desire, and the mind is the seat of intellect and understanding, we nevertheless pray for a heart of understand, for otherwise we will only believe and know what we want to believe.
Good Shabbos! Shabbat Shalom!