There’s a Season 2 episode of “How I Met Your Mother” in which the characters – Ted, Marshall, Lily, Robin and Barney – are guilt-tripped into attending a funeral on Super Bowl Sunday. They DVR the game and try to get through Monday with the result unspoiled so they can all watch together that night; naturally, the plan goes awry as they all find out what happened in an appropriately wacky way.

Ultimately? It didn’t really matter. “I don’t remember who won. Hell, I don’t even remember who played. What I do remember is that we drank beer, we ate wings and we watched the Super Bowl together,” says Ted, the narrator, in a voiceover at the end of the episode. “Because sometimes, even if you know how something’s gonna end, that doesn’t mean you can’t enjoy the ride.”

At the time, the line seemed like a sly nod to fans obsessed with figuring out the identity of the titular “Mother” rather than enjoying the show. But really, Ted’s words summed up the crux of the show’s emotional core, a life lesson that deeply connected with viewers: Even if things don’t go as planned, it’s crucial to remember the smaller moments that make up the bigger stories in life – those will always be the sweetest memories.

For nine seasons (an unusually long TV life span these days) that theme drove the expertly woven storylines of the delightful “How I Met Your Mother,” which ends for good on Monday. It’s time, and probably overdue; the quality of the show has noticeably slipped. Still, there’s no question that regardless of how it ends, the CBS comedy is already a fixture as a comedy beloved by the millennial generation.

In addition to capturing nostalgia, there are many reasons the show caught on with the younger crowd: It launched a thousand catchphrases (“Legend – wait for it – dary”), pick-up lines (“Haaave you met Ted?”) and teachings for 20-something life (“Nothing good ever happens after 2 a.m.”). Overall though, “HIMYM” offered a much more valuable lesson about the importance of adult friendship, as the intense bonding in post-college years means that those friends essentially become your family.

That’s what hooked people, even if at the start the series seemed like a run-of-the-mill sitcom with a clever gimmick to differentiate it from the other “beautiful people figuring out life in New York City” comedies. The first episode opened with two bored-looking kids on a couch as Future Ted (voiced by Bob Saget) delivered the iconic line that would define the series: “Kids, I’m going to tell you an incredible story – the story of how I met your mother.”

Over nine seasons, the series followed Ted (Josh Radnor) and his best friends on their assorted adventures, with every plotline anchored in Ted’s search for his future wife. That was really just the spinning off point, as we all got to know the characters through their own quests for happiness. There was Marshall (Jason Segel), Ted’s best friend who met his soulmate Lily (Alyson Hannigan) on the first day of college; Robin (Cobie Smulders), Ted’s longtime love interest, even though it was established in the pilot that she would wind up just being “Aunt Robin”; and Barney (Neil Patrick Harris), the Bro Code-inventing ladies man.

Every show started with Future Ted, via voiceover, setting up the episode for his kids, promising every story would lead to How He Met Their Mother. Since every episode was a flashback, there were flashbacks within flashbacks, in addition to flash forwards, along with other time-jumping for quick throwaway jokes. What made it last?

“The format, how bold it was in both storytelling and letting characters grow,” Radnor, a mostly unknown actor before breaking out on “HIMYM,” speculates by phone from Los Angeles, pointing out that in addition to all the silly storylines, creators Craig Thomas and Carter Bays weren’t afraid to get serious: Robin’s infertility, for example, or the death of Marshall’s dad.

Radnor frequently sees lists floating around the Internet with titles like 20 Things I Learned from “HIMYM”; he believes that the series struck a chord because it “had a different perspective,” looking at life in a deeper way through memory and nostalgia with a dad telling stories to his kids. That technique subconsciously urges viewers to appreciate the moments they might otherwise miss in their own lives.

Plus, it helped that the cast had natural chemistry from the start: Radnor jokes that it really felt like Ted, Marshall and Lily had gone to college together and picked up two other crazy pals along the way. “From the first time we shot the pilot, the five of us felt like we were friends,” he said. “We didn’t feel like actors who had been cast.”

Just as they seemed like true friends, their triumphs and failures felt real, and the show lasting so long was its blessing and curse. On the plus side, we got to see Barney meet his real dad, and no, it wasn’t Bob Barker. Marshall and Lily had a baby. Then, Robin and Barney got married, which seemed totally out of character; Ted just seemed to be floating between relationships that were a waste of time.

Indeed, the audience eventually started losing patience with the question of “Who is the Mother?” It wasn’t Robin, or a slew of other stunning actresses brought in to play Ted’s love interests that all eventually flamed out; Stella (Sarah Chalke) left him at the altar, Zoey (Jennifer Morrison) wound up being terrible. So the writers brought in Broadway actress Cristin Milioti to star as the Mother, appearing at the very end of Season 8.

As a result, Season 9 – the whole season takes place the weekend of Barney and Robin’s wedding – has also been leading up to the moment that Ted and the still-nameless Mother meet. We’ve already seen them together; some flash forwards have seen Ted and the mother at future moments in their relationship, including one emotional scene that has led some people to think the mother might actually be dead at the end of it all.

“HIMYM” has already left a strong imprint, no matter how it concludes. And that’s sort of been the lesson all along. As Radnor says, despite the fact that people have developed “‘Lost’-style conspiracy theories” about the Mother over time, that was never really the point. Ted meeting the Mother may have been what tied everything together, but as with all long journeys, the most compelling part is what it took to get there.