Comments like this must come from a background of absolute ignorance of utility theory or quantitative economics. I can't think that anyone would make this complaint if they thought critically for a moment about what they were suggesting.
Whether you like it or not, we live in a universe with scarce resources. Humans have finite time, matter, and energy that we need to allocate.
As of today (or at least the very near future), it's probably possible to keep any individual human alive for arbitrarily long. We just might burn trillions of dollars doing it. Obviously, even to someone who can't multiply, this doesn't make sense. If we did our absolute best to keep everyone in the world alive, we would run out of resources immediately.
Now, let's say instead of trillions of dollars, it's millions. This is a plausible multi-year treatment cost. Now instead of running out of resources at 10 people, it's 10,000,000 people. This is still less than the number of people in the world who would plausibly rack up these kind of costs if we didn't "refuse life-saving assistance except in return for payment".
The unfortunate harsh reality is that everyone's life has a finite value. It doesn't make sense to spend more resources keeping someone alive than they're worth; as I said, you'd run out of resources very quickly, even if we pretend it makes sense to dedicate 100% of humanity's output to medicine. Additionally, some people's lives are worth more to everyone else than others. People revile this fact for many reasons, but that's how it is. The market, and most individuals, place a higher value on the life of, say, a surgeon than on that of a busker. The market is a way to (surprisingly accurately) stochastically approximate the value people place on things, including the time of other people. A surgeon gets paid more because (assuming the market is allowed to operate unimpeded) they are valued more, and it therefore makes sense that (through the indirection of money) they are able to pay for that expensive multi-million dollar treatment if they get some complicated disease. Common objections to this include "what about rich retired people who aren't productive anymore", and the answer is that if people knew they couldn't spend the money they were saving right now later on, this would induce even more drastic inefficiencies than that of rich retirees being able to afford medical care more than people still in the workforce.