But... they did, uChat is a fork of Mattermost, and they contributed the changes back to the open source project.
They did. Which makes them not an example of the GP's comment. Most companies do, in fact, end up literally attempting to "write our own chat application" from the ground up. (After all, that's where Slack itself came from—NIHing an MMO-game's chat middleware!)
This is exactly what they did
Re:Uber lays off 435 people
by liveoneggs on Tuesday September 10, 2019 @08:55PM
(#20935540)
they wrote that fancy blog post but couldn't scale ejabberd to 50k users? Whatsapp managed to scale ejabberd into whatsapp so..
> hey, slack is way to expensive, we don't want to get 'locked in', and 'mumble mumble privacy cloud evil stallman'
gets followed up immediately (almost inevitably, in my experience) with
> so lets write our own chat application.... how hard can it be?"
...rather than, say, "hey, I googled and there are a few FOSS alternatives for 'group chat with history': Zulip, for one; Mattermost, for another. Let's see if either of those fit our needs. If they don't quite, though, let's also see if either one of them has a solid, customizable codebase to fix up!"