Electricity follows the easiest, least resistive path to settle to no energy. For lightning, one of these paths is to the earth. Any object that has better conductance than plain air is good for directing lightning.
Other people have already talked about how the car offers a better path but around your body, so that the lightning doesn’t have to flow through your body.
There can be cases where it could travel through your body, like if you had a leg out of your car, because the rubber tires might not conduct to ground as well as your leg can.
Rubber tires prevent discharge to ground even in petrol trucks, which is why sometimes they have a chain that drags close to the ground used for discharging static electricity through an easier path.
Latest Answers