On the Southern California coast, I'd always try to bring the bike & gear into the showers. Barring that, I'd lock it in sight of the entrance ranger kiosk. Maybe the ranger wouldn't even care, but it could give thieves a second thought.
But in campgrounds where there weren't any locals to speak of, as in many parts of the Sierra, I didn't bother with that, but did lock the bike when away from it, as well as put any expensive stuff out of sight. Some sites had lockable bear/thief boxes.