But Uber and Lyft are direct competitors. I have a clause in my contract that forbids me working for a direct competitor, but I'm a software engineer and I have knowledge of trade secrets. A driver? Not so much.
So I think that a court would find a restriction that you couldn't work for both to be an unreasonable exclusion... but I don't know.
But let's say it was legal. Uber still might not be able to do it. They need onboarding to be as frictionless as possible. Tying their hands by saying they can't also drive for Lyft might make people think twice.