It turns out that if your suffering is spectacular enough, people will come save you. Maybe if we throw all the poor children of the world into caves people will start caring about them.
It does become easier to focus on situations in which imminent death is anticipated and possibly observable. Think of the resources and attention devoted to the exoneration of death row inmates as they near execution, versus the attention given to them in the years/decades leading up to the execution. Nevermind the many, many more people who may be unjustly sentenced to life imprisonment.
It is not a new thing. In Seneca's "On the Shortness of Life" there is about people praying to get a few more years of life, while wasting decades when they were younger.
For me it seems as some sort of artefact of human cognition. (Mercilessly used by "last minute" opportunities by salesmen... and journalist.)
Human empathy is an instinct developed on rought evolutionary heurestics, is not rational and doesn't fit complexities of modern world. What else is new?
Still, the question is: for a given amount of resources (time, money, people) how many quality-life-years can be added?
If this quality is order of magnitude lower than other less exciting solutions (e.g. access to medicine and education for kids from poor families), then we should be aware that what we pay for is not lives saved, but an emotional entertainment show.
I'm reminded of a fellow in, IIRC, St. Louis. He expends tremendous amounts of energy, time, and money rescuing stray dogs, to the point where he doesn't have much of a social life. It's all about the dogs.
Someone asked him why he didn't instead pour that energy into helping homeless people. His response was something to the effect that there were plenty of others helping people; his passion was the dogs. I believe he also turned the question around: what are you doing to help the homeless?
A few dozen cave divers can't do much to help the millions of impoverished children, but they used their skills to perform heroic and deadly feats to help 12 children and their coach, and inspired many around the world to ask themselves these types of questions.
Reducing that to a cost-benefit analysis vs some vague "but can't we spend that effort on the other lost kids?" question is both impossible and missing the point.
It's hard to imagine leaving them in there AND living with the knowledge that they had been left in there. Attempting a rescue seems like a pretty human thing to do, and I found it hard to blame people for being people. I certainly do awesome & dumb things because I'm a person.
The difference is one is a very abstract and broad problem while the other is a very concentrated and narrow one. Humans have a hard time in the abstract. I do admit that the sensationalism of this event brought focus from the world but the same rules apply to someone who's stuck in a burning building or under a car or whatever, people will go out of their way to help when there's a well defined and immediate problem.
[0] is the first source that popped up on a quick googling; the US alone spent 18 billion dollars between 2002 and 2014 on food aid (to hungry children and such).