If a cure is ever to be found for something like MND, then attention seeking is exactly what is needed. Of course, people with life changing or limiting conditions need personal support but that's not going to fund research.
Random strangers with no connection are not going to wake up one day and think 'this is the day I'm going to donate to MND', for example.
They do it, if they want to, because they are prompted by seeing a friend or colleague's fundraising page. And that raises far more money than one person silently donating. Of course, many do that anyway and it's also hugely appreciated.
And the vast majority of people who take on challenges for the charity I work for have already lost someone or have a relative who is dying. Sometimes it's a person who is terminally ill themselves.
It's too late for them and their family but they find it a comfort to fundraise for those coming afterwards. It's something they can do to have a tiny bit of control in a situation where they have no other control.
If I'm honest, I have met one or two egotists over the years but generally I do not recognise the performative show offs roundly criticised here.
Fundraising is one of the least cynical sectors I've ever worked in.