Depends. If they lose to AB5, it's immediately over. You see, Uber is not a cab company masquerading as a tech company. No, it has become the latest attempt in a very long list of various form of attempts to essentially roll back the New Deal, undo all the progress organized labor made. Recommended reading: Invisible Hands by Kim Phillips-Fein, this covers the first few decades closing with Reagan (and almost starting with him, too). https://www.wwnorton.co.uk/books/9780393337662-invisible-han... If you consider it from that angle, then pouring billions into it is not that much of an investment. But if AB5 forces Uber to make their drivers employees then the "gig economy" is practically over and with it, Uber as well.
Or, it could just be a perfectly natural market response to blatant regulatory capture and customer abuse on the part of the incumbent taxicab industry.