This is what the California DMV says about your situation.
http://dmv.ca.gov/vr/export.htm
What I can surmise based on the brief reading:
1. If you buy the car here, you probably need to register in your name first, then apply for export, which means you have to pay sales tax (sales tax collected at the time of sale if purchased from a dealer)
2. To avoid this issue, you probably need to take possession of the car "FOB destination" - meaning that you don't own it until you receive it in the UK. The seller (licensed dealer or broker) here in California has to complete the export forms and arranges shipping. The problem of course is that you have to pay upfront and won't have title when you leave. It's a bit risky.
3. If you are buying from a private party, you may be on the hook for the sale tax (it's actually an excise tax) but if you are not a California resident, I'm not sure how you report it... maybe you don't and everyone "forget" about it.
My final take on this? You should speak to a car broker in UK that has done this before.