Again the LORD spoke to Ahaz, “Ask the LORD your God for a sign, whether in the deepest depths or in the highest heights.”
But Ahaz said, “I will not ask; I will not put the LORD to the test.”
Then Isaiah said, “Hear now, you house of David! Is it not enough to try the patience of men? Will you try the patience of my God also? Therefore the Lord himself will give you a sign: The virgin will be with child and will give birth to a son, and will call him Immanuel. He will eat curds and honey when he knows enough to reject the wrong and choose the right. But before the boy knows enough to reject the wrong and choose the right, the land of the two kings you dread will be laid waste. The LORD will bring on you and on your people and on the house of your father a time unlike any since Ephraim broke away from Judah—he will bring the king of Assyria.” (Isaiah 7:10-17)
Isaiah told Ahaz to ask for a sign from God. Ahaz refused. Why? Perhaps because Moses had told the Israelites not to test God (Deuteronomy 6:16). But Ahaz was ignoring the context of Moses’ words—and he wasn’t sincere to begin with.
Ahaz simply didn’t want to do God’s will. He had his own plans that he thought would take care of his problems. He did not trust God, because he did not have a right belief about God. Like many people in his time, Ahaz believed that gods only had authority over their own nations, and that conflicts between nations were conflicts between those nations’ gods. Ahaz thought that his enemies’ gods might be stronger than his, and he wasn’t willing to risk his kingdom based just on what a prophet of Judah’s God told him.
Isaiah gave him a sign, anyway. He told him that a child would be born to Isaiah and before that child was old enough to tell right from wrong, the two kings that Ahaz feared—Pekah of Israel and Rezin of Syria—would be dead. God would do what he intended, regardless of Ahaz’s beliefs.
Matthew understood Isaiah’s words about a virgin conceiving to be a prophesy of Jesus’ birth (Matthew 1:22-23).