It’s worth noting that Titanic wasn’t an instant success. Its opening weekend garnered a modest $28 million—solid, but indicative of a film that would make around $100–$150 million, rather than its final domestic total of $600 million. So why did it end up being so profitable? In part because people kept going back to see the movie again. And they did so in spite of the fact that the last hour is intense, killing off most of the ensemble and having Jack die in such wrenching fashion by freezing to death in the ocean.

The real ending, of course, comes a bit later. There’s an epilogue in which the older Rose (Gloria Stuart) bids Jack a final farewell and goes to sleep, and we’re treated to one last sequence: a dream (or perhaps a metaphorical vision of the Great Beyond, if you buy the theory that Rose dies at the end of the film) in which the wreck of the Titanic is restored to its former splendor. Young Rose appears in a white dress, climbs the boat’s iconic grand staircase, and reunites with Jack, as the rest of the ship’s passengers and crew (minus the story’s antagonists) applaud joyously.

I didn’t really process the final sequence when I saw Titanic in theaters on opening weekend for the first time. I was so spellbound by the movie’s staggering scale that the romance, to a preteen boy (I was 11 at the time), seemed of secondary importance. Jack’s death was sad, to be sure, but felt appropriate given the larger tragedy of the shipwreck. And a perfectly happy ending for him and Rose would have felt too easy.

It’s hard to overstate just how weirdly daring Titanic’s conclusion is, even 20 years on. Cameron conjured a doomed love affair that had its cake and ate it too, both killing Jack and bringing him back to life, and yet neither of those choices felt forced. Yes, Rose’s reunion with Jack in her mind is a fantasy, but it’s one that’s baked into the grand, nostalgic storytelling style Cameron employs throughout the film, a fully earned postcredit to love found and lost but never forgotten. Seeing Titanic with a crowd, even to this day (and it’s been rereleased twice in theaters, in 2012 and 2017), reinforces just how special the finale is. Multiple times I’ve watched dozens of people, many of whom have seen the film before, whooping and cheering at the sight of Jack standing atop that staircase.

Beyond its magically uplifting tone, the scene is a testament to the qualities that distinguish Titanic as a blockbuster today. Cameron’s attention to detail and to the layout of the ship makes its destruction all the more painful; the return of the staircase is almost as exciting as the resurrection of Jack himself. Titanic is also a tale of love transcending the boundaries of class: Cameron looked at the rigidly structured decks of the ship, and the (perhaps apocryphal) stories of poorer passengers being locked away from the lifeboats, and saw a powerful, larger allegory. In Rose’s final fantasy, all of the ship’s passengers, rich and poor, young and old, are gathered together; she’s wearing an elegant dress, while Jack is in his street clothes, and Rose’s villainous ex-fiancé, Cal (Billy Zane), is nowhere to be seen.