Society producing a neurosurgeon isn't useful to someone who can't afford to be treated by a neurosurgeon.
Nor is it useful to someone whose circumstances lead them to die of some more pedestrian cause before they ever need someone as specialized as a neurosurgeon.
Someone who can't afford it can still collect money for it, or society can decide to pay. They can also try to earn more money. And more neurosurgeons bring the price down.