On Sunday night, Mad Men returned for it's 7th and final season. At the opening, the famous title credits played. They sounded, as usual, instantly familiar and completely iconic. But there's a strange story behind their creation. The Mad Men theme song wasn't written for Mad Men at all; it was actually originally an unknown rap song by DJ RJD2 and rapper Aceyalone:

It turns out that Matthew Weiner, the writer, director and producer of the show, is a TV genius in every way. "I choose almost every piece of music on the series," Weiner said in a 2012 interview with TV.com, "I am open to suggestions but usually not interested. I have a very personal relationship with music and am a delusional person to the degree that before the show existed, I kept a file in my iTunes of all the songs that could go one day in the show."

But for all his organization, the show's theme was a complete accident. Before Weiner stumbled across famed producer RJD2 and rapper Aceyalone's 2006 rap song, "A Beautiful Mine," the opening credits for Mad Men’s pilot were originally set to a Beck song. Beck turned down contract after contract that the show's creators handed him. In an interview, he recalled his total lack of faith: "It's about ad executives in the '60s? They’re going to make a show about that? Really? Um, I don't think so."

But one fateful day, Weiner was driving listening to Marketplace on NPR when he heard an instrumental version of RJD2's song playing as a segue between two stories. He immediately called his assistant who helped him identify the song. "[W]e listened to it, and it had everything to it: Big old movie quality to it, and updated beat to it, it had drama. I just loved it."

RJD2's version was chopped up and rearranged by the show's producers to the point where when he first heard it he didn't entirely recognize it. But it quickly became an iconic symbol of the show:

Had the song not been tapped to become the Mad Men theme, though, it would have surely receded into obscurity because the rap is, frankly, terrible. The lyrics are sort of mediocre and Aceyalone sounds kind of like he can't catch the otherwise fantastic beat. Weiner reined in RJD2, too: the original song also featured a tedious synth harmonium outro that, frankly, we're better off without.

But like the miraculous success of the show itself, the song dodged a life of total anonymity thanks to NPR and some downtown traffic. Now, from a stroke of luck and Mad Men's genius, it's one of the most important television theme songs of all time.