Ant Man and the Wasp has plenty of laugh-out-loud moments, including a fight that weaponizes a human-sized Hello Kitty Pez dispenser, and a sequence that turns Scott Lang, aka Ant-Man (Paul Rudd), into a kind of adult toddler. In that sequence, he has to visit his daughter’s elementary school to pick up an important bit of tech. He tries to shrink to insect-size to sneak into the building, but the regulator on his costume that lets him change sizes is malfunctioning, and he ends up about three feet tall — child size. He has to put on a child’s sweatshirt and pretend to be a student in order to sneak past the hall monitor. When he finally gets out of the building and into his partners’ waiting SUV, his scientist associate Hank Pym (Michael Douglas) looks at his downsized frame and says, “So do you want a juice box and some string cheese?” Scott looks cranky for a second, but then turns hopeful. “Do you really have those things?” he asks.

Scott’s question is funny in part because the film is all about the juice boxes. Ant-Man and the Wasp cheerfully delivers guilty, sweet pleasures for children of all ages. And in the process, it follows in the footsteps of many superhero narratives before it. There’s a good reason for the long tradition of humorous superheroes — superheroes are kind of ridiculous. And while some fans and creators insist that the genre can handle serious, weighty material, the truth is that superhero stories which acknowledge the conceit’s central improbability are often more sophisticated, and more thoughtful, than their more somber, dark-cowled brethren.

Those dark-cowl stories have often been celebrated as a welcome evolutionary super-leap forward. In one popular interpretation of comics history, American superhero comics started out as simple, pandering stories for kids, but have matured and become more sophisticated over time. Creators like Stan Lee, Steve Ditko, and Jack Kirby added realistic angst and interpersonal conflict to superheroes in the 1960s. Then Alan Moore and Dave Gibbons threw in truly adult sex, violence, and political themes, including mass murder, in their seminal 1986 series Watchmen. In the 2000s, Christopher Nolan’s Dark Knight films dealt with weighty themes about civil rights, the war on terror, and class conflict, while this year’s Marvel Studios movie Black Panther directly addressed global racism and imperialism. “Superheroes — they’re not just for kids anymore!” has become a broad cliché, used to mock clueless mainstream news stories on the topic.

But this story of superheroes bashing their way to increasing relevance can obscure a parallel history of highly acclaimed comics fluff. Back in the 1940s, Captain Marvel — who battled the genius worm Mr. Mind, and palled around with a talking tiger — was more popular and substantially more inventive than the drier and less whimsical Superman. The campy Batman television show of the 1960s simultaneously mocked and embraced the idea of a wholesome hyper-competent hero who never parked illegally, but could still dance with the hip kids. And the 1978 Superman film drew inspiration from the adult humor of 1930s fast-talking screwball comedies, with Clark Kent / Superman (Christopher Reeve) and hard-nosed reporter Lois Lane (Margot Kidder) exchanging witty quips between super-flights. Zack Snyder’s Man of Steel (2013) has lots of Christ imagery and civilian death. But it doesn’t have any sequence as flirtatiously, memorably grown-up as Lois Lane daring Superman to use his X-ray vision to tell her the color of her underwear.

The creators behind grimdark superhero narratives sell their stories as being more weighty or impressive than lighter films like Ant-Man and the Wasp because they’re more realistic — which is to say, more violent and more depressing. But humorous superhero stories have a different kind of verisimilitude. Specifically, they acknowledge that superheroes are a goofy, somewhat embarrassing idea — a “big dumb dream” as comics critic Tom Crippen notably dubbed them.

Imagine you had the power to fly, or stretch yourself into a pretzel, or climb walls, or grow 60 feet tall. Naked empowerment fantasies are exhilarating, a little shameful, and obviously implausible. (“You were bitten by a radioactive spider, and then what happened?”) Serious superhero narratives can end up looking clueless, as they try to graft gravitas onto a story about a guy who wears a leather bat-suit, or a flying alien with X-ray eyes that can also shoot lasers on command. In a universe where someone can throw a hammer, keep a hold on its handle, and fly, it’s more sensible not to worry too much about making sense.

Sometimes recognizing the illogic of the superhero genre can lead to parody, as in the recent Japanese anime One-Punch Man. The series features an unassuming, bored hero who can defeat any enemy with one punch. Each episode ends up as an extended joke about how the superhero genre works, with every hideous, terrifying protagonist defeated in a quick overdetermined anticlimax. The good guys always win; the outcome is never in doubt. Why pretend otherwise?

Mainstream American superhero humor, though, tends to be less about deflating superhero tropes, and more about reveling in them. Probably the most famous line in Thor: Ragnarok, for example, is the moment when Thor (Chris Hemsworth) realizes that the terrifying opponent he has to meet in gladiatorial combat is the Hulk (Mark Ruffalo). “Yes!” Thor shouts when he sees the familiar green dude. “We know each other! We’re friends from work!” The line was apparently improvised by a kid visiting the set that day, and Hemsworth delivers it with a kid’s exuberance, capturing the joy of a genre expectation fulfilled. Look, the film declares, it’s the Hulk! Everybody loves the Hulk! You’re here to see superpowered dudes fight, and now they’re going to fight. Yes!

The Deadpool films are built on raunchier, more adult (or at least more adolescent) humor. But at bottom, they’re also about laughing along with ridiculous superhero tropes. Deadpool’s regenerative ability means he can be bashed and stabbed and dropped from buildings and chopped into bits, and he still keeps going — a pleasingly absurd extension of superheroes’ notable ability to get knocked over and keep coming back, no matter the obstacle.

Deadpool 2’s Domino (Zazie Beetz), whose superpower is luck, is a similarly self-conscious elaboration on superhero expectations. Superheroes are always unaccountably dodging bullets and getting to the bomb in the nick of time; the greatest superpower of all is being the protagonist and having the writers on your side. Domino just makes the subtext into text, miraculously surviving car crashes and walking through hails of shrapnel unscathed. She’s just doing what all the other heroes do, but with an extra wink so the audience can laugh about it.

The Ant-Man films are even more amused by their own super-jokes. Both movies revel in the visual gags made possible by the power of scale, with Ant-Man almost washed down a drain (despite Mr. Rogers’ reassurances) and engaging in a life-or-death battle in a briefcase. And then there’s the virtuoso sequence where Ant-Man battles his evil antagonist atop a Thomas the Tank engine model train. Ultimately, the train grows to enormous size, crashing through the side of a house and causing great confusion and delay before it rolls onto its side, with those terrifying Thomas googly eyes rolling wildly.

The nod to children’s entertainment is absolutely intentional. The Ant-Man films recognize that superheroes, for all their powers, are often best when they’re treated as smaller than life. It’s not exactly mature to imagine you can solve every problem by being super-strong and hitting it, or to fantasize about being able to shrug off any amount of damage and walk away with a quip. But who wants to be a full-grown adult all the time? Many of the best superhero narratives know that it’s silly to want the juice box. But they let you smile anyway as you take a sip.