They've only ever made substantial profit from ads, YouTube (which they acquired), and possibly Workspace or Cloud. The last time I looked at their filings, they weren't transparent about which businesses are profitable.
This isn't a company that's had a coherent identity or strategy.
iMessage is important to Apple because it's an exclusive social network that only Apple devices can access.
Slack is important because it's a backbone of a business SaaS ecosystem.
But Hangouts was never going to have either of these functions.