I'm not sure what you mean by "no purpose".
Gallagher is an overpaid player who isn't what he used to be. He is noticeable for the wrong reasons as well. But there's more than a little confirmation bias there. Part of that is that he's got the worst 5v5 G% and PDO, and the best (among regulars) 5v5 CF%, xGF% and SCF%. And honestly, that lines up with what we've both seen and what we'd expect of Gallagher, who has historically been good at driving play 5v5, but no longer has a good defensive center or complementary linemates to make up for his weaknesses and whose underlying numbers don't address that his play-style is very north-south and doesn't do enough to create opportunities with pre-shot movement. He's been unlucky, but still bad.
That still doesn't to me match the idea that the Habs would be better off without him, but more that this team sucks. They have an inexperienced coaching staff that is more concerned with helping young players transition to the NHL and developing the way the play the game, than they are having a clear structure and approach to the game. They have a really bad roster on paper even before injuries.
Montreal is rebuilding so even if if getting Gallagher out of the lineup would help (it wouldn't), the organization isn't looking at results but at approach and process. Gallagher's job is to be Gallagher and he's doing that. And him being paid to do a lot more doesn't really mean he should be out of the lineup.