In which states are ride sharing apps like Uber and Lyft illegal ?

Maybe, but the fact that they are independent contractors ( which is also true of drivers at some cab, car service and limousine companies) doesn’t mean the licensing/insurance etc requirements are different from those who drive company-owned vehicles. In NYC , it doesn’t matter who owns the vehicle -both the vehicle and the driver must be properly licensed with the TLC. I suspect there are few , if any, places where I can legally act as a cab or car service with my regular passenger vehicle license and my personal car insurance.
That’s where I get confused about Uber - is the argument that drivers and vehicles don’t have to follow the licensing requirements simply because you order a car through an app rather than by phone? Actual ride sharing would probably be exempt, but at the point where there is a profit (not merely sharing expenses on a trip both people would be taking anyway) it’s no longer ride sharing.

“Ride sharing” seems to be code for “pretending not to be a cab company”.

It’s all basically along the same lines as escorts claiming they’re not prostitutes because the money spent is for the date, not whatever might top off the date.