So Aaron Sorkin? As Claude Rains said at the end of “Casablanca,” “As I suspected, you’re a rank sentimentalist.” Then again, anyone who has stuck with “The Newsroom” through its three interesting, exhausting, at times aggravating seasons — or for that matter, “The West Wing” in its heyday — won’t find that to be a major surprise, or always a bad thing.

Yes, the writer rails against the failings of the modern media, but that’s because of his faith in the nobler aspects of the calling. Yet in romanticizing the news, his fictionalized work didn’t just preach, capitalizing on the benefit of hindsight to illustrate where journalists have fallen short, but too often rang hollow.

Those excesses, for good and ill, were evident throughout this finishing six-episode arc and Sunday’s series finale (and SPOILER ALERT if you haven’t watched), which followed the sudden death of news chief Charlie (Sam Waterston) while his principled anchor, Will (Jeff Daniels), sat in prison for refusing to divulge the name of a source in an Edward Snowden-like whistle-blowing case.

To his credit, Sorkin tied up most of the loose ends, even within a truncated run. It’s how he tied up those threads that left something stuck in one’s teeth.

Before it was over, all the newsroom employees dutifully paired up with each other (that early-season threat from human resources about fraternizing with colleagues really was a joke), while the jargon-spouting entrepreneur who bought news network ACN to reinvent it, played by “The Office’s” B.J. Novak, was finally cajoled and threatened into doing the right thing, placing the news division under the stewardship of MacKenzie (Emily Mortimer), the ethical producer he had come close to firing.

One suspects staff members of the New Republic, who recently resigned en masse faced with similar new management, might find the timing of that outcome particularly ironic.

The way everything fell into place, it was hard not to think about Woody Allen’s fantasy sequence in “Annie Hall,” when he magically producers Marshall McLuhan to shoot down the theories of an intellectual snob, breaking the fourth wall to tell the audience, “Boy, if life were only like this.” Heck, Will even got the opportunity to tell off the ghost of his dad while in prison.

Sorkin, of course, created this world, and has the right to make the story turn out the way he thinks things ought to go, as opposed to the way they usually do. That was, in a sense, part of the romance surrounding “The West Wing,” which exhibited great knowledge about politics but not cynicism.

Nevertheless, “The Newsroom’s” critique drew strength from Sorkin’s grasp of media, and was clearly intended to resonate by weaving together real-life events, like coverage of the Boston marathon bombing, or fictional ones that closely mirrored reality, such as a cable-news reporter being fired for an ill-considered tweet about Republicans.

After all of that, it’s a little too convenient — or at least, not wholly convincing — to just sprinkle fairy dust over the whole enterprise and scribble “And They All Lived Happily Ever After” across the screen.

The shame of it is there was really nothing else quite like “The Newsroom” — or for that matter, Sorkin’s previous media-centric series, “Sports Night” and “Studio 60 on the Sunset Strip” — in terms of providing such a smart and acerbic take on the medium’s inner workings, without resorting to all the customary cliches.

Indeed, one of the ironies of Hollywood is the fact movies and TV shows about it almost invariably seem to have been written by someone who’s only visited the place, which certainly wasn’t the problem here.

That said, “The Newsroom,” despite a number of nice moments, including a few in the finale flashing back to Charlie’s role in everyone’s lives, has to go down as a failed experiment, one whose strengths couldn’t overcome its weaknesses.

Sorkin’s tendency to veer out of his lane to wag fingers also resulted in unexpected collisions, like the college-rape subplot in the penultimate hour that unleashed a torrent of criticism. There were actually legitimate points buried in that sequence — among them that cable talking heads turn everything into sports, not news — lost through the awkward construction, with the producer lecturing the victim about the dangers of trial by media.

Granted, there were plenty of people just happy to hear a point of view that mirrors theirs expressed so articulately, and to luxuriate in Sorkin’s rat-a-tat banter (although one friend observed, only half-joking, that the show’s tone was enough to make you “embarrassed to be a liberal”). With the writer immersing himself in features, viewers might not get another fix of that on TV for a while.

In a way, though, it’s that very admiration for Sorkin’s talent that set the bar so high for “The Newsroom,” tackling an important topic within the friendly and liberating confines of HBO. On paper, it looked like a marriage made in heaven.

Yet while the series wrapped up, appropriately, with Will saying “Good evening,” after three seasons that kept looking backward, there was no cause to shed a tear over saying “Goodbye.”