The question asks why God doesn’t heal sick people: but the fact is, He does! There are people both in scripture and in our own midst whom God has healed. Prayer is powerful. Prayer works.
James calls on us to pray for sick people, that they might be healed (James 5:14-16). He speaks with confidence, because in his day the presence of the Holy Spirit meant that people could be directly cured, and their cure was certain. Today we do not have the Holy Spirit, and we cannot lay hands on the sick in the certainty that they will be healed. But God does hear our prayers for them, and as is His will, so He answers (I John 5:14-15). But He will only answer ‘according to His will’.
We can be confident that He hears us, and confident that He has the power to heal. But we cannot dictate what God will do. He will be the one to choose what He will do. He may heal; He may extend the life of the sick person; or He may grant them a quick and relatively painless death, so that their suffering is reduced. We may not now understand the choice He makes, but one day we will understand. In the mean time, we must accept that ‘God knows best’.