Of the 600,000 Israelites who perished in the wilderness in their unbelief, it is written that "God was not well-pleased with them" (1 Cor. 10:5).
Those Israelites had been redeemed out of Egypt by the blood of the lamb (symbolic of our redemption through Christ), they had been baptised in the Red Sea and in the cloud (symbolic of baptism in water and baptism in the Holy Spirit) (1 Cor.10:2). Yet God was not happy with them.
God was nevertheless very good to them, in that He provided all their physical and material needs supernaturally. "Your clothing did not wear out on you,nor did your foot swell these forty years", Moses told them at the end of their forty years of wanderings (Deut. 8:4).
God healed all their sicknesses too. The Bible says, that "there were no sick and feeble folk among them." (Psa.105:37 - Living).
God did many miracles for them. In fact, no single group of people in the world's history has ever seen as many miracles as those unbelieving Israelites did, with whom "God was angry for forty years" (Heb. 3:17).
This teaches us that God answers the prayers of carnal believers too - and that He provides them with their earthly needs, even supernaturally if necessary. The fact that God does a miracle for us proves nothing about our spirituality. It only proves that God is a good God Who makes His sun shine on the righteous and the unrighteous alike!
Jesus also warned us that in the final day of judgment, many who had done miracles in His Name would be rejected and disqualified because they had lived in sin. He said, "Many will say to Me on that day, 'Lord, Lord did we not prophesy in Your name, and in Your name cast out demons, and in Your name perform many miracles?' And then I will declare to them, 'I never knew you; depart from Me, you who practise lawlessness.'"(Mt. 7:22,23).
He was obviously referring to Christian preachers and healers who did genuine miracles in His Name. From the words of Jesus, it becomes clear that MANY of these men (not just a few and not all, but many) who have these miraculous ministries are not free from sin in their private lives and in their thoughts and attitudes. This will be exposed at the judgment-seat of Christ.
This teaches us very clearly that the working of miracles, by itself, is no indication that a man is approved by God. Have we understood this thoroughly? If not, we will be deceived.