There is a saying in Christianity: "God requires your faith, but He does not expect you to lean on a shovel and pray for a hole". This simple saying is all that is necessary to answer an atheist who asks us "gotcha" questions like "if you get sick, do you go to a doctor, or pray for healing?"
This question shows such an abysmal lack of understanding of Christianity that it can be reasonably assumed the ones asking it are insincere. It's not necessarily the case that they know the answer to the question that they're asking, but at any rate, they do not want to know. They don't want to know the basics of the Christian faith. They don't want to be given reasons to believe it. They care so little about Christianity that they have either done no research, or they have, and know the problem with the question.
What's worse is that ours is the first time in history when such flawed questions have actually been possible. In the modern world, we have things relatively easy. Sure, we still have disease, poverty, oppressive governments etc., but most Christians, and indeed most atheists, have a relatively simple life today. We don't need to worry as much about our future. But historically, people, including Christians, knew hardships. They all at least tried to work, and Paul even said that he who will not work, neither shall he eat (2 Thessalonians 3:10).
So do atheists really think that in 2,000 years, no Christian saw the inconsistency between faith and work? Here is how Psalm 127 opens: "Unless the Lord builds the house, They labor in vain who build it; Unless the Lord guards the city, The watchman stays awake in vain." The Lord builds the house, but notice the builders are still laboring to that end. The Lord is guarding the city, but they still have a watchman.
It is simple Biblical wisdom, therefore, to combine faith and works. There is even a whole chapter which discusses how "faith without works is dead" (James 2:20, 26). If you get sick, you don't just sit there praying to heal. You get up and do something about it. Take a drug designed to treat it. Seek a doctor if things don't improve. Seek the Lord, asking Him to give the doctors wisdom, make the drugs effective, and restore your body to its former glory.
You see, then, that only someone who knows literally nothing about the Christian faith can honestly think such a question in any way shows it to be flawed. This should raise many questions about those who aren't honest about it. Why do they ask this question? And indeed, even those who genuinely are ignorant, what stopped them from doing the slightest bit of research?
Sin. The answer is sin. As a species, we are by nature rebellious towards our Creator. We hate His ways and turn to our own, but it turns out this has some very foreseeable consequences. Rebel against the Author of life, what else is there but death? But God, being the Author of life, is able to write us a different ending. Though we die on the earth, regardless of how good our healthcare is, we can go to the Great Physician, Jesus Christ, for eternal life in the Kingdom of Heaven. He died for our sins, so that we may live in His righteousness.