An early top executive at the network believed that “the man of the house” paid for cable TV subscriptions. That mind-set affected HBO’s programming for decades.On “House of the Dragon,” Emma D’Arcy plays a would-be queen who is weighing what to do in the face of betrayal. On “Euphoria,” Zendaya plays a high school student who starts using drugs shortly after leaving rehab. On “The White Lotus,” which returns for its second season on Sunday night, Jennifer Coolidge plays a dazed heiress trying to escape her troubles in the comforts of a Sicilian luxury hotel.These characters are the new faces of HBO, the Emmy-magnet cable network that, until recently, specialized in making programs about men for men. In fits and starts over the last two decades, the network has at last begun to move away from the leering lotharios of its early years and the tortured male antiheroes of its middle period to present shows built around complicated women who drive the action.In the 1980s, when HBO was just starting to make original programming, its top executives made a point of appealing to male viewers. It was a strategy that affected the network’s creative output for years to come.Jennifer Coolidge, center, in a scene from Season 2 of “The White Lotus.” Fabio Lovino/HBOEmma D’Arcy, right, with Olivia Cooke in HBO’s latest ratings hit, “House of the Dragon.”Ollie Upton/HBO“I’ve figured out through research, and in my own mind, that the man of the house decided whether to have HBO or not,” said Michael Fuchs, the channel’s top executive when it started to concentrate on original programming, in a 2010 interview with the Television Academy.“I made sure that there were things for men,” he continued. “If commercial television had a female slant, HBO had a male slant.”The network bet big on stand-up comedy specials featuring mostly male comics in the years when it was defining the look and feel of premium cable. Without the restrictions of broadcast TV, George Carlin, Chris Rock and Robin Williams were free to do their routines unfettered.In the 1980s, the network cemented its identity as one that appealed to men when it signed the heavyweight champion Mike Tyson to an exclusive deal. At the same time, HBO started airing the documentary series “Eros America,” which was soon renamed “Real Sex.” It kicked off a run of sex-focused documentary shows, which would include “G String Divas,” “Cathouse” and “Sex Bytes.”HBO’s early forays into scripted programming followed a similar tack. John Landis, an executive producer of “Dream On,” a comedy about a male book editor that made its debut in 1990, used the show’s gratuitous nudity as a selling point. “We have breasts in the script just for the sake of seeing breasts,” he said in a 1992 interview. “Excuse me, but what’s so bad about that?”Susie Fitzgerald, an HBO programming executive from 1984 to 1995, said “Dream On” appealed to her bosses because it was cheap to make and “it featured nudity — female nudity, of course.” She recalled HBO’s research executives preaching that men “controlled the remote.” That line of thinking became a factor in programming decisions, she added.Return to Westeros in ‘House of the Dragon’HBO’s long-awaited “Game of Thrones” prequel series is here.Playing Kingmaker: Fabien Frankel plays Ser Criston Cole, who got to place the crown on the new King of Westeros’s head. He is still not sure how he landed the role.The Princess and the Queen: Emma D’Arcy and Olivia Cooke, who portray the grown-up versions of Rhaenyra Targaryen and Alicent Hightower, talked about the forces that drive their characters apart — and pull them together.A Man’s Decline: By the eighth episode of the season, Viserys no longer looks like a proud Targaryen king. The actor Paddy Considine discussed the character’s transformation and its meaning.A Rogue Prince: Daemon Targaryen is an agent of chaos. But “he’s got a strange moral compass of his own,” Matt Smith, who portrays him, said.Ms. Fitzgerald, who helped oversee HBO comedy specials starring Ellen DeGeneres, Roseanne Barr and Whoopi Goldberg, was part of the team behind the network’s first series to win widespread acclaim, “The Larry Sanders Show,” about an insecure talk-show host and cocreated by and starring Garry Shandling. Around the time of its debut, Ms. Fitzgerald said she floated the idea that a woman should be the lead of an HBO comedy series. She faced resistance when she brought it up, she said.The beginning of the shift toward productions centered on women did not come about until 1996, with the premiere of “If These Walls Could Talk,” a movie chronicling abortion in three different decades. It was produced by Demi Moore, who also had a leading role in the film.HBO didn’t give the green light to “If These Walls Could Talk” in the hope that it would attract large numbers of viewers and subscribers. The network’s main interest was in doing business with Ms. Moore, who was then at the height of her fame.“If These Walls Could Talk” did have something in common with HBO’s other productions, though: It had a strong point of view — fiercely in favor of abortion — and it was not a fit for broadcast TV or basic cable, which made money by keeping skittish advertisers happy.When the ratings came in, the executives were floored: “If These Walls Could Talk” had attracted the largest audience ever for an HBO production, contradicting its “man-of-the-house” programming strategy.Shortly afterward, HBO bought the option for “Sex and the City,” a book by Candace Bushnell on the lives of single women in Manhattan. The series ran from 1998 to 2004, becoming a cultural touchstone and winning 7 Emmys (out of 54 nominations). It also spawned two feature films, a popular sequel series, “And Just Like That,” for HBO’s streaming service, HBO Max, and countless memes.Sarah Jessica Parker as Carrie Bradshaw in the long-running HBO series “Sex and the City.”HBO, via Everett CollectionBut just as “Sex and the City” was in the middle of its run, HBO went back to the old playbook, adding “The Mind of the Married Man” to its prime-time schedule. The half-hour series was centered on a married Chicago newspaperman, his married pals and their sex lives. Writing in Entertainment Weekly, the critic Ken Tucker called the show a “rancid little barf-com” and found fault with its “moronic sexism.” And soon after 10 million viewers tuned in for the “Sex and the City” finale, HBO returned to a bro-y sensibility with “Entourage,” about young men on the loose in Hollywood.When Casey Bloys, the current head of programming at HBO, joined the network in 2004, its audience was still largely male, thanks to a cluster of shows — “Oz,” “The Sopranos,” “The Wire” — that chronicled the exploits of male antiheroes and outlaws.“There was definitely a core male 25- to 54-year-old audience,” Mr. Bloys said.Some HBO series appealed to women — Alan Ball’s “True Blood” and Michael Patrick King’s and Lisa Kudrow’s “The Comeback” — but old habits were hard to shake.In 2010, Mr. Bloys and his colleagues in the programming department were impressed by a proposal from a 23-year-old writer and filmmaker, Lena Dunham, for a series about young women in New York. Other executives were against it, partly because of the age of Ms. Dunham’s central characters, who were more than a decade younger than the “Sex and the City” foursome.“The prevailing wisdom of the time was that men basically subscribed,” Mr. Bloys said. “So in conversations around ‘Girls,’ they said we had never done a show with that young a lead and a female lead that young. The idea was young adults were not deciding to subscribe to HBO because they weren’t the head of the household.”After Mr. Bloys and his associates prevailed, “Girls” became a critical hit and fodder for thousands of think pieces. “Veep,” starring Julia Louis-Dreyfus as a U.S. vice president, was right around the corner.Even so, shows about men remained HBO’s stock in trade, along with certain tropes that had devolved into cliché. In a 2011 essay, “HBO, you’re busted,” Mary McNamara, a critic for The Los Angeles Times, blasted the network for its overreliance on scenes set in strip clubs and brothels.Must every HBO drama, Ms. McNamara lamented, feature shadowy men conducting business against a backdrop of unclad women? She cited “The Sopranos,” “Game of Thrones,” “Rome,” “Deadwood” and “Boardwalk Empire” as the biggest offenders, noting that “HBO has a higher population of prostitutes per capita than Amsterdam or Charlie Sheen’s Christmas card list.”The cast of “The Mind of the Married Man,” a critical flop.Anthony Friedkin/HBOJames Gandolfini as the HBO antihero Tony Soprano.Anthony Neste/Getty ImagesBy the time Mr. Bloys took over the programming department in 2016, 57 percent of viewers of HBO’s Sunday prime-time lineup were male, according to Nielsen. As Mr. Bloys settled into his new role, the network began a reboot of the cultural shift it had attempted two decades earlier with “If These Walls Could Talk” and “Sex and the City.”“My philosophy as a programmer was, if you’ve got a male core, that’s great,” Mr. Bloys said. “You do want to make sure you’re tending to that core audience, but you also have to broaden out from that. You can do both.”As the #MeToo movement ousted men in positions of power in the media industry, the signature HBO protagonist began to change. There were still shows centered on tortured male antiheroes — “Succession,” for one — but more and more, a new character came to the fore: the tough but flawed heroine who is looking to right past wrongs.“Big Little Lies,” starring Nicole Kidman and Reese Witherspoon, chronicled a group of women in Monterey, Calif., who band together after one of their husbands, an abuser, is murdered. In “Sharp Objects,” Amy Adams played a self-harming newspaper reporter who investigates the murders of two girls in her Missouri hometown. In “Mare of Easttown,” Kate Winslet immersed herself in the role of a damaged police detective working to solve the murder of a teenage mother in blue-collar Pennsylvania. “I May Destroy You,” a coproduction with the BBC, starred Michaela Coel as a struggling writer who attempts to shed light on her own past rape.Michaela Coel was the star, writer and producer of “I May Destroy You.”HBO, via Associated PressMs. Coel was the creative force behind “I May Destroy You.” Another female writer-producer, Marti Noxon, was the creator of “Sharp Objects,” a limited series based on the novel by Gillian Flynn. But several other HBO shows with female protagonists were led by men: David E. Kelley was the showrunner of “Big Little Lies”; Brad Inglesby created “Mare of Easttown”; and Saverio Costanzo was the creator of HBO’s adaptation of “My Brilliant Friend,” a show adapted from the Neapolitan novels series by Elena Ferrante.HBO reapplied the lesson it had learned from “Girls” when it signed off on “Euphoria,” a series about the drug-fueled escapades of teenagers created by Sam Levinson, with Zendaya in a starring role. Earlier this year, that show became the most-watched HBO program since the network’s biggest hit, “Game of Thrones.”The results of the shift have been evident in the makeup of the audience for HBO, which celebrates its 50th anniversary in November, and the streaming platform that shares its name. According to Nielsen, those watching the cable channel had a 50-50 male-female split in 2021, and 52 percent of HBO Max’s viewers in September were women.“I think that any brand — this is not specific to television — has to evolve,” Mr. Bloys said. “You can’t just kind of become comfortable and think, ‘Well, we know how to do one thing and let’s keep doing it.’” More