A DiscreditedHigh School trope that is not disappearing any time soon. Every Jerk Jock has done it to the Ordinary High School Student at least once. Even an Alpha Bitch or two has done it to the Naïve Everygirl.
If this has ever been done in real life, it must have been during a time before schools were as crowded as they are today and lockers were bigger. So writers, who are almost all well into their thirties regardless of the show's target demographic, may have grown up seeing stuff like this. Many still think it's what kids do today. Or perhaps a really old High School show once did it because the director thought it'd be funny and everyone else followed suit. Who knows.
Chances are, it did happen once or twice, but it could also have originated as a joke, since larger lockers were commonplace in older school buildings. However, today, schools are built to accommodate a higher volume of students, and stacked lockers are more common. Older buildings may still have the larger lockers but these are often ditched during remodeling.
Not to be confused with Stuffed into the Fridge, aside from establishing how much of a jerk/monster the stuffer is.
Examples:
open/close all folders
Anime & Manga
In an early episode of Sayonara, Zetsubou-Sensei, Kiri somehow managed to stuff herself in Nozomu's locker, which seemed to be quite small.
Inazuma Eleven: Kabeyama tries to hide himself in a locker, so he doesn't have to play a soccer match, but he ends up getting stuck in it due to his large body size.
Film
At the beginning of Lean On Me, a pair of bullies stuff Thomas Sams into a locker (which is somewhat remarkable in itself, since Sams is rather fat) and walk away. Then, to drive home the point of how much the conditions at East Side High had deteriorated in the 20 years of Joe Clark's absence, a janitor lazily walks down a hall that intersects the hall with Sams' locker while reading a newspaper. Sams is screaming for help, and despite the screams being very audible in the empty hallway (the school day had just ended), the janitor completely ignores them.
Happens in Sky High, to the kid who can glow. In fact, the only reason you know he's in the locker is that it's glowing bright green.
In the slasher films Hello Mary Lou: Prom Night II and The Guard from the Underground, characters are stuffed in lockers, then crushed inside them.
Live Action TV
In Saved by the Bell, Screech apparently has built a labyrinthine series of secret passages throughout the school lockers.
The locker jokes on You Can't Do That on Television aren't really an example, though Lisa once locked Alistair in his locker on purpose, which is closer. He turned it into a TARDIS and threw a party.
On an episode of Strangers with Candy, one of Jerri's boyfriends did this to her because he didn't want the other kids seeing them together.
The first episode of Buffy the Vampire Slayer has a variant-the guy is stuffed in the locker after he's dead.
On Degrassi Junior High it was traditional to stuff students into the broom cupboard rather than a locker.
Abed: It's where I spent a lot of time in junior high. Annie: You think that's where we'd put you? You know that's absurd, right? Abed: Well, I'm not stupid. You can see I've increased the square footage; it's a metaphorical locker. It's a place where people like me get put when everyone's finally fed up with us.
Music Videos
Played with in the My Chemical Romance video for 'I'm Not Okay'; a teen gets shut in the locker, and uses his position to jump out and scare the locker's owner.
Theater
IIRC, this was in the background of this troper's school production of Grease.
Video Games
In Bully, this is one of many schoolyard torments Jimmy can deliver upon his fellow students.
Also reversed in this one, where a bully get a locker stuffed into him. That's gotta hurt.
Referenced (but not depicted) in The Wotch to justify Robin and Jason's decision not to inform Anne that her personified feminine pride had gender bent Tandy Garden High's worst jerk jocks into four "honest and kind" cheerleaders.
Similarly, the nerds at Springfield Elementary in The Simpsons are shown to have a secret clubhouse/base hidden within the lockers.
In another episode, Lisa attempts to find common ground with a bully, only to end up...you guessed it.
Lisa: How about jazz? Do you like jazz?
Milhouse: I like jazz.
Lisa: Milhouse? She got you, too?
Milhouse: Yeah, but it's not so bad. I'm standing on Ralph.
Ralph: We're a totem pole. (hops up and down chanting)
In an episode of Clone High, JFK boasts of stuffing the entire freshman clsss into only ten lockers. And in another episode, Abe, having gone without sleep for almost a week, stuffs himself into a locker (and since Abe was six-foot-four, he was folded like an accordion).
X-Men: Evolution did this in the second episode, with Kitty Pryde as the target. Naturally, this was a setup for her to discover her phasing power, and not coincidentally, run into Avalanche, who was the episode's main villain.
One of the many ways Danny Phantom'sintangibility power comes in handy. The opening credits even shows him phasing out and stuffing one of the Jerk Jocks in.
In the Transformers Animated episode "Autoboot Camp", Bumblebee was stuffed into a locker by Wasp and Ironhide for getting them in trouble to Sentinel Minor. Right after removing his legs.
In an episode of King of the Hill, one student who's been scaring Bobby by sneaking up to him managed to hide inside Bobby's locker for the next scare.
Tuck is tiny. And, when he got shoved in the locker, he was unconscious and slowly dying. He got better, eventually.
Real Life
Some full-height lockers had a latch on the inside which would allow anyone this might happen to (regardless of how often it really did happen) to easily escape, presumably after the bullies have left.