Part of the freedom man has received from the Lord is having the ability to refuse to listen to Him. Man has exercised this freedom many times.
"But they refused to hearken, and pulled away the shoulder, and stopped their ears, that they should not hear. Yea, they made their hearts as an adamant stone, lest they should hear the law, and the words which the LORD of hosts hath sent in his spirit by the former prophets: therefore came a great wrath from the LORD of hosts" (Zechariah 7:11-12 KJV).
But God has the same kind of freedom: "Therefore it is come to pass, [that] as he cried, and they would not hear; so they cried, and I would not hear, saith the LORD of hosts" (Zechariah 7:13 KJV).
This is a dreadful statement. God had also said He would not listen one and two hundred years earlier in Jeremiah 11:11 and Isaiah 1:15. There is something He will listen to, though—a prayer of repentance. But repentance is more than just saying, “I’m sorry.” It is a change of heart, mind, and actions. Look at the conditions for repentance in Isaiah 1:16-18:
"Wash you, make you clean; put away the evil of your doings from before mine eyes; cease to do evil; learn to do well; seek judgment, relieve the oppressed, judge the fatherless, plead for the widow. Come now, and let us reason together, saith the LORD: though your sins be as scarlet, they shall be as white as snow; though they be red like crimson, they shall be as wool" (KJV).
Read more here.