If you buy a car in CA and register the car in CA, then you will pay CA sales tax at the time of registration. For whatever reason, the amount you pay is based on the total percentage sales tax in county in which you register the car. Sales tax varies from county to county in CA, so you may be able to save a little money if you can register your vehicle in a county that has a lower sales tax.
On a slightly different note, IIRC, if you buy a car OUTSIDE of CA and can prove that you have payed sales tax on the vehicle outside of CA, then you do NOT have to pay sales tax again in CA. At least that is the way it was when I bought my used truck in Montana several years ago.