Okay.
So we all (mentally ill or not) have a 'window of tolerance'. You can look up illustrations of this but image three sections. The middle section is our tolerance window - where things feel okay, we might have ups and downs a bit but even when we do, they feel within our control and we manage and can cope with them.
The top section is called 'hyperarousal' - where things feel out of your control and you might become angry, distressed, anxious, self-sabotaging, harmful etc. The bottom section is called 'hypoarousal'. In this space you'll become disconnected, detached, numbed out.
All of us will have those sections in different sizes. Someone whose life experiences have set them up to have a lot of emotional resilience will have a big central tolerance window, and good coping strategies for when they are knocked outside of that window. Someone who has had more challenges may find themselves falling outside of that middle window a lot, and/or not having strong strategies for returning to that middle window when they've fallen out of it.
The reason that many people will seek help when they have attempted to end their lives is because they will have made that attempt whilst dysregulated - either hyper or hypoaroused. They very much meant it in the moment. But the act itself has then brought them back into their window of tolerance or closer to it, which gives you a 'back to your senses' moment of realisation. When in your window of tolerance, you seek support to continue living. The goal for anyone struggling with harm or suicidal ideation is to find strategies that give a similar shock, but without the bodily harm.
Other people might use self-injury as a way to demonstrate their need for attention and care, as they haven't received consistent support in formative times and as such use unhealthy but successful manipulation strategies. We are all manipulative as humans, and we all manipulate people all the time - but the people who are doing it noticeably are actually doing it badly because it is noticeable, if that makes sense. The skilled manipulators amongst us receive care and love through their refined skills. Those without opportunity to have practised help-seeking and asking for support in healthy relationships will need support to seek in ways that doesn't harm themselves to do so.
Some professionals haven't received the right training, or our burnt out, or are just arseholes. But I work in NHS mental health care and far more than not genuinely wish the best for their patients.