You could say it all began at the end of 2005. Media mogul Sumner Redstone, then a sprightly 82-year-old, decided to split up CBS Corp. and Viacom Inc., the two companies he had merged a mere six years before. At the time of the split, Viacom's stable of youth-aimed networks were the cool kids: Comedy Central, MTV and Nickelodeon were the future.

More important, they were the cool kids with a two-stream business model: a virtual lock on youth-oriented TV advertising and lucrative fees from cable operators. CBS, on other hand, had the oldest audience on TV at 50 years (median) in a market that depended on advertisers that worship the 18-24 demo. The onetime “Tiffany Network” wasn’t even that anymore: After Dan Rather was ousted in scandal the year before, even the crown jewel of the “CBS Evening News” was about to lose its lead for good.

CBS was, in short, an anachronism; dead weight; detritus to be sloughed off for dividend investors to allow Viacom to thrive.

What happened in the next 10 years was a stark reversal of fortunes that few could have predicted: History intervened, and the forces of business and tech realigned in CBS’ favor while pushing Viacom toward obsolescence. At close of business on Thursday, Viacom was valued at $12.4 billion, half of what it was worth at the start of 2006. And CBS Corp.? $20.9 billion, up almost $2 billion.

It wasn’t a fluke. And the truth going forward must be confusing to those in the habit of writing TV’s obituary: Forget Viacom, forget Twitter, Facebook, YouTube and Vice. Forget Netflix, BuzzFeed and Hulu. Broadcast TV is here to stay and CBS is its future.

Let me explain: At a time of near-infinite choice, CBS gathers a simultaneous nightly audience of 10.96 million, more than any other content entity anywhere. It does this not because there are three networks, or because people have to, or because someone “promoted” the video, shared it or topped it with a clicky headline. They do it because they choose CBS.

Consider further that CBS now makes $2.7 billion a year (up from zero) on fees from cable operators; yet because they’re a broadcast network, and not cable, they are free to collect that money and distribute their shows elsewhere on the web.

Because of a deal it didn’t do — deciding not to join NBCUniversal, Disney, and then-News Corp. in Hulu — it has been able to build up its own direct-to-consumer business with the CBS Access app. Sometime in the first three months of 2017, CBS will give All Access viewers something they can't get anywhere else: They're bringing "Star Trek" to the smaller screen, under the eye of geek god Bryan Fuller (“Hannibal,” “American Gods”) as showrunner.

Just like "House of Cards" transformed Netflix with exclusive content, a new "Star Trek" could give people a reason to subscribe to All Access, even if they have cable or digital rabbit ears.

While other giants of the TV business like Comcast, News Corp., Disney and Time Warner’s Turner Broadcasting spent years building out and acquiring collections of cable TV channels to build leverage against distribution, CBS opted out. In the content-vs.-distribution wars of that era, collections of cable TV networks looked like a lucrative bet; not so much now as audiences drain away and the cable bundle unravels.

What's more, CBS also has its own HBO/Netflix competitor in Showtime, a rising premium cable service now distributed, much like HBO Now, via a broadband for paying cord-cutters everywhere. Hello, subscription revenue not tied to cable.

Not only did history go CBS’ way, but CBS, by the moves it made and didn’t make, either by happy circumstance or pure planning, seems perfectly tuned for the unbundling currently taking place.

So, how did this happen?

Hollywood's Last Showman

CBS Corp. President and CEO Leslie Moonves took over CBS at the network's lowest point, in 1995, fresh off a three-year stint as head of Warner Bros. TV, where he developed a few shows you might have heard of — "ER" and "Friends." That’s right: Mr. CBS actually helped build NBC into “Must See TV.”

Then, as if to prove it wasn’t a fluke, he dropped some other biggies that blew it up for CBS’ geriatric viewers: "Everybody Loves Raymond," "Crime Scene Investigation," "Survivor.”

Photo: Monty Brinton/CBS

If Plato's cave allegory had included a network executive, it would have been Moonves: bespoke and grey-haired and gravel-voiced, as though he always has a cigar on hand; unafraid to go against the mainstream by going mainstream.

Moonves is broadcast TV's last true believer, the guy who wants his shows to appeal to as many people as possible ... and to get paid for every person watching. He got his start as an actor (really — you can catch him in a Season 4 episode of "The Six Million-Dollar Man"), and continues to be the consummate showman, whether his audience is potential advertisers, investors or reporters.

What makes Moonves so good at TV? Jason Hirschhorn, former chief digital officer at MTV and current CEO of MediaRedefined, has a compelling theory: “The reason Leslie is maybe the best programmer around is that he doesn’t make shows for himself.” While NBC was making clever, self-referential shows like “30 Rock” and “The Office,” CBS was going big and broad.

In 2008, a streaming TV service called Hulu made a splash by offering full episodes of certain broadcast shows for free (with ads). A year later, Hulu found its more-or-less-permanent stakeholders in NBC Universal, Disney-ABC Television and 21st Century Fox, and those three companies turned Hulu into a day-after-air destination, gradually increasing the number of episodes available.

The reason CBS sat out isn’t that Moonves is a Luddite. “He always wants to know what’s new in the world,” Hirschhorn says. “They didn’t chase waves. It’s not that they were hesitant; they just weren’t going to jump without looking.”

Quincy Smith, then CEO of CBS Interactive, the network’s digital arm, convinced Moonves the future of CBS depended on stricter control of their content rights — control they'd lose if they put their shows on Hulu, which was demanding exclusivity.

"We like the ability to control our own content where and when it goes. We don't like the idea of being exclusive to Hulu," Moonves told investors during an earnings call in May 2009, closing with a rather devastating "We wish Hulu well."

Marc DeBevoise, current EVP and General Manager of CBS Digital Media for CBS Interactive, came to CBS in 2011, after serving as Starz's head of digital. DeBevoise says there’s another issue with putting shows on any streaming service: No matter how hard a network tries to inform viewers where that content came from, confusion still reigns.

"Oh, I learned that the hard way at Starz," he says. Cable customers would receive a free premium channel two-for with HBO and Starz, and "everyone would misidentify our shows. They thought it was all HBO."

So DeBevoise concentrated on putting CBS' mobile house in order, releasing apps for CBS and CBS Sports. But it wasn't until DeBevoise and CBS head of research David Poltrack saw how many people were using the CBS app — and what they were watching on it — that they saw the dollar signs. An unexpected chunk of people were spending time watching classic CBS shows, including "Star Trek."

“It was close to three years ago, we really started talking about a model that allowed us to get paid the right amount for that content on the app," DeBevoise says.

There was clear interest in watching live programming, too: "We learned seven years ago we could run a live camera feed of all the rooms in 'Big Brother' and sell a subscription for that," DeBevoise says.

Poltrack began testing various iterations of a streaming service with focus groups, and almost immediately saw consumer desire for a triple-play of sorts: the ability to watch shows live, past seasons of current shows, and those classic CBS-owned series like "Taxi" and "Cheers" and the original "90210."

Photo: CBS

Hello, Subscriptions

The result was CBS All Access, the $6-a-month service that does indeed include the ability to watch CBS live, thanks to deals with 125 local affiliates. (Not every market in America has this option yet, but DeBevoise says they're closing in on 90 percent coverage.)

It's also ad-supported, which means it not only puts $6 per month per subscriber in CBS Corp.'s pocket, but also brings in some advertising dollars as well — about $4 a month per customer.

"We believe in the ad-supported model, but we also believe in finding new business models as well," CBS’ head of ad sales, Jo Ann Ross, says. "Now, if somebody wants to buy a digital package that's going to amplify what they do on the channel, we're able to facilitate that."

Even better for CBS, though, it’s a new source of inventory for Ross to use to make up for any missed ratings guarantees on the network, rather than having to offer spots that might be more in-demand. Analysts estimate that there are around 500,000 All Access subscribers those advertisers can reach, and CBS says 66 percent of those users fall into the advertiser-coveted 18-49 demographic.

Of course, compared to even the audience of rapidly canceled CBS shows like midseason Jane Lynch comedy "Angel From Hell" — which got the axe after just five episodes, averaging an audience of 7 million — 500,000 seems like peanuts. But given that CBS owns just about all the content on All Access, it's as close to free money as you can get in this world.

The demand for All Access even has executives considering an ad-free tier for an extra $4 a month, bringing the total cost up to $9.99. "There's usually around 15 to 20 percent of the population that are just classic ad-avoiders," Poltrack says. Even if a minuscule portion of subscribers decide to pony up, the extra $4 makes up for any potential shortfall.

“If you’re going to have an online service, particularly a television service, it can’t just be what was on television," Hirschhorn says. "There has to be something specific to that service if you’re going to charge an additional fee.”

Too, Moonves estimates "Star Trek" will be halfway to paying for itself before it even premieres, thanks to CBS’ ability to sell the show to buyers overseas. The last movie, "Star Trek Into Darkness," saw a massive increase in international box office from the first of the rebooted film series that eclipsed the domestic haul. "Our international distribution guy is going crazy," Moonves boasted to investors in November 2015. “He can’t wait to get out into the marketplace and sell that.”

Interestingly, no one we spoke to at the network is ruling out the possibility that the new "Star Trek" may also come to the TV network at some point, though the current plan is for a big splashy one-episode premiere on CBS followed by an exclusive run on All Access.

Courting Cord-Cutters

CBS is perhaps the only broadcast network that can get away with launching a product aimed squarely at cord-cutters, and, weirdly, it’s doing so while charging pay-TV companies even more for carrying CBS.

Photo: Neil Jacobs/CBS

Whereas just a few years ago the network snagged 75 percent of its revenue from advertising, that number is down to around 55 percent now. The money isn’t disappearing; it’s just being made other ways. It made just over $1 billion in the last three months of 2015 selling its shows abroad and online (“We don’t think Netflix is the Antichrist,” Moonves has said on multiple occasions), and it makes somewhere between $2 and $3 per month per subscriber from pay-TV companies.

And unlike in the advertising arena, for those pay-TV companies, age truly is just a number; it doesn’t matter as much to them that, according to ratings firm Nielsen, the median age of CBS viewers is 59. All they want is customers who’ll pay their bill every month.

CBS is a little leaner than the other broadcasters, who are all flagships for cable TV empires. Fox has critical darling FX, various sports networks, and National Geographic channels; NBCUniversal had, at last count, 17 networks under its umbrella; and ABC is part of the massive Disney family that can't seem to shake stockholder fears over corporate sibling ESPN.

The cable TV portfolio strategy looked great in 2010. Today? Not so much. “The weakest part of the ecosystem is the pay-TV channels, not broadcast,” says Wedbush analyst James Dix. “There are broader challenges to television that could catch up to CBS,” he adds, “but being such a pure-play on the best part of television, they don’t have as much exposure.”

Instead of having to fear retribution from cable providers that might attempt to move other networks around its tiers, CBS can just go about its business. And business is looking pretty good. The company posted its best quarter ever on Thursday, with $3.9 billion in revenue and earnings per share of 92 cents for the last three months of 2015, hitting Wall Street’s estimate square in the chest.

The numbers for that quarter don’t include the mountains of ad revenue for the Super Bowl and AFC Championship Game, and since 2016 is an election year (in case you hadn’t heard), the network will see an influx of political ad dollars at its local stations.

Moonves will tell anyone within earshot that, by 2020, CBS will take in $2 billion in those pay-TV fees. For pay-TV companies, all that matters is whether their customers drop their cable company for not carrying certain channels, and so they’ll pay up.

Time Warner Cable learned this after going to the mat with CBS in the summer of 2013. Thanks to an exodus of customers who left after TWC let CBS go dark for a month, the cable provider lost $122 million in subscriber revenue that quarter. When Viacom tangled with cable operators Suddenlink and Cable One in 2015, incidentally, the media company found itself dropped from those systems.

The big lesson of the last 20 years seems to be that when it comes to media, you’re probably best off betting with Les.