Presumably so that the customer can contact the driver if they need to pass on instructions about a specific place to be picked up, etc.
Theoretically, if the company can get a bunch of phone #s, they could even completely anonymize it by assigning two temporary numbers (one to driver, one to passenger) and call-forwarding them for the duration of the trip. I havent' checked but I doubt anybody actually does this. And in the absence of this level of anonymity, I would at the very least expect a car service app to require you to place the call before giving you the phone # of the other person.
Actually, I think they use some sort of phone proxy service. I once looked at my driver's phone and he had a totally different number listed for me that I did not recognize (same area code though).
You wouldn't even need a bunch of phone numbers. Assuming caller ID works correctly, you can use that to decide where to route the call. Customer A is calling? Route to Driver X? Driver Y is calling? Route to Customer B.