That's what happened in an unincorporated community on Lake Tahoe in California when a Placer County Sheriff's deputy had to deal with a bear stuck inside a locked Subaru Outback. The Sheriff's Office uploaded this video to Facebook of one of its deputies smashing the rear window and running to let the bear out.
The bear "destroyed the interior so badly that the doors couldn't be unlocked," the department wrote. "It was decided the safest way to get the bear out of the car was to break the window. Deputy Lade was brave enough to break the window, allowing the bear to jump out and flee into the forest."
It wasn't clear how the bear got itself locked inside the car in the first place, but it looked pretty eager to get out. Commenters on the Facebook thread suggest it isn't at all uncommon for bears to open unlocked car doors in the area.
Looking over Autoblog's bear-in-car archives, we offer a story from last summer about a man who found a black bear honking the horn of his Honda Pilot in his driveway in Roanoke, and this chestnut from 2016 about a black bear that got itself locked inside an Outback and also trashed the interior in Colorado.