If you’re looking for a word to describe the feeling in the nation’s newsrooms after a Donald Trump win, “shell-shocked” would probably be a good one. How is this possible when every poll and prediction site said that Hillary Clinton would win? How could everyone have gotten it so wrong?

The inescapable fact is that most of the mainstream media got it wrong because they simply couldn’t believe that Americans would elect someone like Donald Trump. Denial can be a powerful drug.

In part, that’s because much of the East Coast-based media establishment is arguably out of touch with the largely rural population that voted for Trump, the disenfranchised voters who looked past his cheesy exterior and his penchant for half-truths and heard a message of hope, however twisted.

As the editor of Cracked put it in a very perceptive essay: “If you don’t live in one of these small towns, you can’t understand the hopelessness. The vast majority of possible careers involve moving to the city, and around every city is now a hundred-foot wall called ‘Cost of Living.'”

But there’s more to it than just that. As I tried to explain in a previous post about Trump’s rise, he took advantage of a media landscape that has never been more broken, more fragmented and more open to misinformation, disinformation, and even outright hoaxes and lies.

Get Data Sheet, Fortune’s technology newsletter.

In the end, all of the fact-checking, all the digging done by people like David Farenthold of the Washington Post, and all of the editorials and endorsements were like spitting into the wind.

One of the downsides of the fractured media landscape is that it’s easier than ever to sit in an echo chamber or filter bubble and preach to the converted. Newspaper readers believe what they want to believe, and so do those on Facebook—and never the twain shall meet.

Much of what mainstream media did to try and puncture Trump’s ascendance, including reporting on his offensive remarks about women and his “dog whistle” comments on immigration, probably had the opposite effect. They reinforced his image as an outsider, as someone in tune with “real” American values—as a “force for change.”

That’s not the only blame that the media deserves either. Much of the early coverage of Trump, and even well into his campaign, treated him as a joke, as entertainment, as a sideshow.

The assumption was that Trump was such a buffoon, such a huckster , that the American people would surely see through his tricks and lies. All that was required was to point at him and laugh, to reveal the ignorance of his campaign or the poverty of his ideas. And that was a fatal mistake.

Meanwhile, Trump fans and Clinton-haters were not even listening—they were reading InfoWars and Breitbart News and listening to Glenn Beck or Morning Joe, or reading websites that few in the traditional media had ever even heard of. Sites that told the “truth” Trump supporters wanted to hear.

All of this was exacerbated by the current media landscape, one in which mainstream media outlets are desperate for revenue and reliant on a click-based or eyeball-based business model—one that gave Trump billions of dollars in free coverage.

How many articles were written about Trump simply because editors knew that they would get clicks, even if they legitimized the crackpot theories of people like Alex Jones of InfoWars? How much of what the media engaged in was really an exercise in “false equivalence,” in which a dubious story about Hillary Clinton’s use of email was treated the same as Trump’s sexual assault allegations or ties to Putin?

Donald Trump outsmarted Hillary when it comes to earned media. Watch:

Cable news fell into this trap as well, putting Trump surrogates on for hours and treating them like experts or pundits. CBS president Les Moonves said it best when he said that Trump “may not be good for America, but [he’s] damn good for CBS.” He went on to say:

The money’s rolling in and this is fun. I’ve never seen anything like this, and this going to be a very good year for us. Sorry. It’s a terrible thing to say. But, bring it on, Donald.

Moonves said later that he was joking, and perhaps he was—but he still summed up the cable TV phenomenon better than anyone else has. Everyone loves a horror show, and everyone loves a horse race, and that’s what the TV news gave them every day of the election campaign.

Facebook also played a role, given the fact that huge numbers of people rely on it for news, and much of that news was either distorted or outright fake. Those filter bubbles became even stronger. And the electorate believed what it wanted to believe, not what traditional media told them to believe.

Here’s the bottom line: The most powerful thing about the digital disruption of media is that it has allowed so many new channels of information to spring up that anyone can become a news publisher and distributor, and anyone to choose who they trust and who they believe.

But that strength is also a double-edged sword. It allows us to find sources that cater to our beliefs instead of challenging them, and it allows us to see what we want to see, not what is actually there. Trump voters were arguably guilty of doing that, yes, but most of the media did the exact same thing.