Another big part of it is simply admin, for twitter a lot of that is babysitting the moderation algorithms as their customers(who is not the people tweeting) can be pretty sensitive about what kind of content they are associated with.
Then there is defensive research i.e. any big company in a particular space wants to have prototypes and technology ready to compete with anything their competitors might come out with especially if they expect a growth in overall sector revenue.
For uber they are also a de-facto employer for a lot of drivers and a provider of real world services so they need the full range of hr and customer support services that those kind of services and driver numbers would require had it not been a tech company.