There are a number of possibilities. But, even if done improperly, aside from a personnel complaint, there is little that can be done here.
Taking the keys is one way of finding out who was in an area, however. Proper or not, it is effective. And, arguably, could have been made under the community caretaking exception to the 4th Amendment. We wouldn't want to have his car stolen, would we? And with more than 1800 fires being fought in recent weeks in CA, law enforcement is being particularly vigilant - and suspicious - of cars and people off the beaten path.
It's not easy, but it can be done.Unless an informant was involved, or contraband was in plain sight, I can't see how probable cause could be formulated for a stationary, unoccupied car short of a K9 alert.
We do not know what the officers might have known, what they saw, heard, or smelled, or even what forest it was in. Th area may have been at risk for fire, under evacuation orders, known for poaching or pot growers, any number of things. Plus, even in National Forests, one cannot generally just go driving willy nilly where you wish. And even if they had opted to tow the vehicle, waiting for a tow in a National Forest can be a lengthy affair if possible at all.
That seems pretty much the lone remedy available here.If you weren't physically injured or charged with a crime, then there's not much you can do. Maybe file a complaint with the officer's internal affairs department, but that doesn't benefit you directly.
- Carl

