When Dirty Dancing hit theaters on August 21, 1987, more than three decades ago, it was widely expected to be a flop. The film hadn’t tested well with audiences — at one screening of a rough cut, 39 percent of viewers didn’t even realize it had an abortion subplot — and the distributors planned to let it run for a weekend, then release it to home video.

But nobody was going to put Baby in a corner. The film was a sensation. Based on the youthful experiences of Eleanor Bergstein, who wrote the screenplay, the film clearly resonated with audiences; their repeated viewings and enthusiastic response made it one of the highest-grossing films of 1987, and made Patrick Swayze and Jennifer Grey into bona fide stars.

The story on its surface is simple: a girl on the cusp of womanhood (Grey) goes with her wealthy family to a summer camp in the Catskills, where she learns to dance, but also falls in forbidden love with the dance instructor (Swayze). It’s a classic princess-and-stable-boy situation: class, experience, and a stern father separate them.

But Dirty Dancing looks unique, especially more than 30 years after its release. For one, its princess — who’s nicknamed Baby, but actually named Frances, for Bergstein’s older sister — is both doe-eyed and socially conscious, in tune with world events and planning to join the Peace Corps after she finishes a degree in “economics in underdeveloped countries” at Mt. Holyoke.

She and the other young women at camp are surrounded by college boys, recruited from Harvard and Yale to wait tables and show “the daughters” a good time. The obvious subtext: Bring your well-bred daughters to camp, and we’ll serve up some well-heeled young men for them to marry alongside the tennis and golf and mambo lessons. The “help,” on the other hand, are the working-class kids brought in to do the dirtier work, including entertaining. Hanging with them is “going slumming.”

Dirty Dancing is set in 1963 but released in the 1980s, and its interest in class politics through the lens of the Reagan administration is what makes the story move. The well-bred Ivy League boys could be straight out of a comic piece on clueless men today: “Sometimes, in this world, you see things you don’t want to see,” one young man says to Baby in all seriousness, doing what can only be described as “mansplaining.” Another tells her that “some people count, and some people don’t,” then straightfacedly hands her a copy of The Fountainhead, instructing her to “be sure you return it, I have notes in the margin.”

Johnny Castle, Swayze’s dance instructor, is different. He’s not swaggering or proud of his background. (Johnny is meant to be close in age to Baby, too, but in typical fashion for Hollywood men at the time, Swayze was much older than the character he was supposed to be portraying, which makes the age gap seem a bit more drastic than may be comfortable from 2018, too.)

You get the sense that Johnny’s been made aware of his “place” too many times to count: “The reason people treat me like I’m nothin’s because I’m nothin,” he tells Baby. Dirty Dancing feels like a predecessor to movies like Magic Mike, which cast cash-strapped young men, many from blue-collar backgrounds, in the position of entertaining well-off women and trying to figure out if they’re supposed to like it.

Johnny doesn’t expect much from people, especially not the “rich and mean” people at the camp, who treat him cordially and then get mad if he gets too close. But despite Baby being much younger than him (something the movie never really addresses), she makes him think there might be some people in the world who still have principles, and even, he claims, makes him want to be a better person. Baby has the same effect on her father, when she angrily tells him that he disappointed her for not holding to his own principles. In a herd of morally limp camp-goers, those transformations stand out.

Dirty Dancing is often described as a coming-of-age story, probably because the girl at its center is just about to turn 18. But of all the main characters, Baby goes through the fewest changes in the film. By the end she’s more confident and wiser about the world, but Grey’s performance from the start projects a confident young woman who’s not afraid to dance with a stranger, take on a wild and difficult project, or dump a pitcher of water on the crotch of a young man who’s gotten way too drunk on his own privilege. Johnny, and even Baby’s father, go through bigger transformations than she does.

If you read between the lines, it’s a subtle coming-of-age story for America, seen from the distance of 24 years. Grey’s voiceover in the opening moments reminds us that the summer of 1963 was before Kennedy was assassinated, before the Beatles brought rock ’n’ roll to America. The movie contrasts the more staid and “innocent” entertainments of the wealthy classes in a post-war country with the coming heated revolutions in politics and in culture.

Near the end, camp owner Max Kellerman reminisces with the band leader about the past — the wars, the Depression — before saying that “it all seems to be ending.” The kids don’t want to come to camp with their parents anymore — “trips to Europe, that’s what kids want!”

“It feels like it’s all slipping away,” he says, before taking the microphone to join the group singing the camp song. And then he’s interrupted by Johnny and Baby, who dance to “(I’ve Had) The Time of My Life,” and the whole crowd joins in.

From 2017, the film feels dated; for one, it’s hard to imagine a dance film about social divisions being almost entirely cast with white people today (though it’s worth remembering that’s exactly what Magic Mike did). But Dirty Dancing was already a throwback when it came out. It’s wildly entertaining, but it runs on the rails of conflicts and movements that have marked the last half-century. And just like its heroine, it’s not going to apologize for that one bit.

Watch the trailer for Dirty Dancing: