I have worked in mental health provision in various contexts. Some of the reasons people don't get what they need:
Often the waiting times are too long. 18 months to 2 years in some IAPT services.
Waiting lists for CAMHS are insane - young people frequently age out of eligibility having waited for years without being seen.
Often when people are offered treatment, it's 6 sessions with a trainee therapist - which is nowhere near enough support for someone with complex, longstanding and serious mental health issues.
People have varying needs, and getting help for the particular difficulty (or set of difficulties) you're facing is key.
Someone with a spot of moderate work-related stress might just need some psychoeducation, and practical support such as career guidance, or communication skills training (though often the issue is solved by moving to a job or workplace that's not shit!).
Someone with schizophrenia may need to see a psychiatrist in the context of a multi-professional team.
Someone with complex trauma who is dependent on multiple substances is going to need intensive, ongoing, multi-disciplinary intervention.
Someone with anorexia is going to need specific eating disorder support (and possibly also an autism evaluation).
Someone with dementia needs a different kind of mental health support than someone who doesn't have dementia.
Etc etc.
Part of the trouble is that if there's nobody to correctly assess what the problems are you're dealing with, and consider them within the wider context of your life circumstances and physical health status, you may never be referred to a service that could potentially make a difference.
If you only get 7 minutes with your GP, often over the phone (and it's hard enough even to get a GP appointment at many surgeries), and their first port of call is to put you on SSRIs and stick you on a general counselling waiting list, it might be years (or never) before anyone spots you have dementia, or complex trauma.
Plus, most people aren't going to tell their GP (who they've likely never met before, over the course of a 7 minute phone appointment) they are starving themselves, or addicted to fentanyl, or suffering flashbacks to horrific sexual abuse that they feel ashamed about, or losing their memory, or hearing voices.
It's miraculous, given the system we're working in, that as many people as they do get helpful support. But it's a pretty grim outlook overall.