I live in California (where my car is registered) and my car is titled in Virginia (where I bought it). Who would pay the title transfer fees if I sold my car to someone in California? Is the title fee just the published $15 for California and $10 for Virginia, or are there hidden fees? (Could the title transfer trigger some random document request 10 years later that costs $500, as is common with DMV)
The law will say who does and pays what
The law in Virginia will impose obligations on sellers and buyers to do things and pay fees on the transfer of a vehicle. Similarly, the law in California will do the same.
I’m not going to look up those laws for you but they will be pretty clear and straightforward - vehicle transfers happen hundreds if not thousands of times a day in each jurisdiction.
The contract can, of course, require the seller or the buyer to pay all transfer fees irrespective of who is legally obligated to do so. Failing to do that and causing damage to the other person would be a breach of contract. Most vehicle sale contracts don’t do that, they just let the fees fall where they fall.