As we are moving in a car, electrons are exchanged between our clothes and the car seat, building up collections of excess charges. By the time we get out of the car, we have accumulated an overall charge, whilst the vehicle carries the opposite charge. As the rubber car tyres are insulators, the charges can't escape to the ground. So while opening the door, because of the flow of electrons, we get an electric shock.