you typically pay the sales tax in the state that you plan to register the car in. However, if you happened to pay the sales tax at the time of the transaction in the other state based on the dealer insisting, then you only owe the difference to the state you are bringing the car to. I didn't pay a dime in taxes to the other two states I bought my car in, because I was an out-of-state buyer.
That being said, I wouldn't be surprised if California requires all buyers to pay sales tax. They try to collect money any way they can. As someone said before, you circumvent sales tax in California if you have the car shipped to you.