In the first instance, both parties can refuse, and can drive in any way they want. One-off rides (or paying for part of the gas in a carpool) aren't much of a worry. This is basically as safe as driving yourself somewhere. Of course, they could be a really bad driver with minimal insurance, so hopefully nothing bad happens. In addition, in these situations, you are usually on a friendly basis with the person - minimally a coworker.
Your safety is different when you start to ride with someone that does it for a living. You don't know the person, so you are trusting they know what they are doing and can drive in a way that is safe for you. The more folks drive, the more likely they are to be in an accident (this is why insurance increases with your commute). Minimally, they need to know how to combat this. I'd prefer them to have a more comprehensive driving test, including things like passenger safety and minimal regulations on driving record/background check. Unlike your friend, I'm pretty sure a taxi service has to have adequate insurance in case of an accident. Many places also have policies about pricing because of shady pricing policies in the past.