They didn't build their own. The just forked Mattermost and skinned it a bit. Also invested/spent/donated $10k to have a say in Mattermost's roadmap.
Why not slack TL;DR - Uber, surprisingly, is cheap about off-the-shelf solutions. Cheaper than they are about balloons anyway.
Slack was trialed twice. Once in late 2015, and there were some bumps. Rather than stick with it, Uber ditched it citing it "couldn't handle their scale". Maybe that was true at the time, but I had a distinct impression that that's what the group in tech services at the time _wanted_ as well. Their lead on it was very much the type of person that would argue that there's no difference between hipchat and slack. If you asked the right person, you'd get the real answer: slack costs more than hipchat. Besides, the only person they had to convince was directors that didn't use chat anyway. All the executive leadership used Hangouts too. So they just needed to show the price graph comparison to justify, but as far as I know no qualitative productivity cost/savings/improvements measurement was made or factored into this.
Fast forward to the second try, late 2017. Supposedly when Dara came in he asked the same "why not Slack?" question. The UChat team was pretty intent on doubling down justifying their product, but a Slack pilot was done anyway. The pilot was a massive success by all accounts and basically everyone that made the switch was quite happy with it. Then tech services ended the pilot, sent out a survey, and were never heard from again. Would frequently give spiky answers when people asked for the results of the survey as well. Again - ask privately, and the answer you'll get is that Slack was just deemed as too expensive.
In both cases - tech services claimed that Slack was too expensive because of a price that was linearly extrapolated from their website. A lot of people didn't buy this, because that's just not really how enterprise contracts work. But tech services isn't accountable to UChat users, just the eng leadership they report up to.
In any case - everyone* else is still paying the productivity cost of using UChat/mattermost. It's more reliable than hipchat, sure. But is's miles away from being as useful as Slack. Especially the mobile apps - mattermost is a low quality, utilitarian react native app.
*Except ATG. ATG uses Slack because they actually don't fall under the CTO's jurisdiction. And executive leadership all still presumably use hangouts, because the UChat mobile apps are too crap.
When Uber trialed Slack in 2015, there were clear performance issues. Uber was aware of the potential issues ahead of time and slowly onboarded individual teams. As the onboarding went on, functionality like searching for an individual user clearly deteriorated.
I left Uber before the late 2017 Slack test, so I know nothing about it, but I think "It costs too much" is a very fair objection to using a chat app, especially for an unprofitable company that would have to pay for >30k seats.
At this point, I'm sure that Slack has resolved these performance issues for the sake of onboarding all companies that are Uber-sized or larger.