Here is what most probably happened to you. Honestly, happened to me once aswell^^
You entered the map with your car to park it, and exited the map quick (as you should do).
But it seems you missed that while entering the map with car, you encountered critters.
What you should do then is get quick into car again, and enter another parking lot.
Always check the message box when parking, if you read critter names, click fast on the car again.
I had this very same accident near SF. Parked car, ran out of map. Thought everything was fine. I trade
in SF and come back to car, to meet a pack of NPCs almost killing me. It seemed when i parked my
car, these NPCS were too far away from me to see or attack me, but when i spawned
again there, they saw an attacked me. My solution, i grabbed 2 friends and killed the NPCs inside,
and got my car back.
And now heads up, shit happens to all of us
Maybe next time, you create a tent near SF to have a save
parking lot. Or take some buddies with you as guards.