Sorry about the rambling below. In short, it is a devastatingly isolating thing to hear when you are already so down. Many problems, physical or mental are permanent or sufficiently permanent. Even if not permanent, what really matters is how you feel and what you believe. The statement is very dismissive on many levels. I do however, like to think people do mean well but simply lack the understanding of the depth of despair that others can be in, so I try to not judge them. Perhaps they just didn't know what to say. We are all just flawed and limited bipedal apes.
Speaking as someone who hasn't been suicidal for most of their life, I think people who have not been suicidal just simply cannot appreciate the depth of suffering of someone who wants to end their life, it's really a very next level thing, the way it consumes everything. My life has gone from normal to totally dysfunctional. I will admit I don't think I fully understood it before it happened to me.
I do think some people really just are putting their own feelings first when they say something like this, while other times they really just don't know what to say.
mental health issues are horrific and so poorly understood and so poorly supported. On top of everything you have to deal with the loneliness of being isolated in your own suicidality. No one can truly experience anyone else's pain, and a statement like that is like a slap in the face because it shows that lack of understanding, making you feel even more alone in your despair.
Sometimes I wish someone can just experience it with me, only for a minute, like the human soup of experiences, perhaps then we can all find support and solace in each others understanding, rather than judgement.