Hollywood has always prided itself on being the place where illusion is sold as reality. But no film director was ever as skilled at mining the gap between fantasy and fact as the studios’ PR chiefs in Hollywood’s golden era (1910-1960), imposing images on their stars that had about as much to do with the truth as pornography does with genuine sexuality. Marilyn Monroe was sold as an all-knowing sexual vamp, when in truth she was a deeply damaged woman who was sexually abused and exploited throughout her life. Kirk Douglas was styled as an all-American alpha male when his name is actually Issur Danielovitch and he grew up speaking Yiddish, in unimaginable poverty.

Doris Day, who died this week, was in many ways the most interesting example of this dissonance between the public persona and often not entirely private reality. Her image of the perky girl next door was both the making and eventual undoing of her career, and it has proved extraordinarily tenacious in the minds of the public and critics. Movie fans long ago grasped that, say, Judy Garland’s image as the innocent sweet songbird didn’t really match up with the miserable, pill-addled figure she already was by her mid-20s. But it was the rare obituary of Day this week that didn’t describe her somewhere as the “girl next door”.

Day was already a singing sensation when she pivoted to movies, and her wholesome image made her an obvious contrast to, among others, Monroe. One was the woman a man might fantasise about; the other was the one he would marry, went the press coverage at the time, and Day was energetically sold to the public as America’s virginal sweetheart. Yet by the late 1940s she was a twice-divorced mother, having had her only child, Terry, with her first husband, the viciously abusive Al Jorden. He was the first in a long line of unworthy husbands Day collected along the way. Undoubtedly the one who hurt her the most deeply was Marty Melcher, her third. But when he died in 1968 after 17 years of marriage, Day discovered that not only had he squandered the millions of dollars she’d worked so hard to earn, but left her crippled with debt and signed up to multiple TV specials, none of which she felt well enough to do. Even worse news came the following year when Charles Manson’s followers slaughtered five people at 10050 Cielo Drive, Los Angeles, including a heavily pregnant Sharon Tate. One of the killers revealed that they had actually been looking for Day’s son, Terry Melcher, a record producer. Melcher had once rented that house, and was targeted because he had refused to produce Manson’s album. The deeply traumatised Melcher and Day had to hire bodyguards.

And yet, Day carried on with the trademark pluckiness audiences have always associated with her. This is probably why her image has fooled so many for so long: while she might not have been the innocent virgin the studios claimed, she had a likable doughtiness that kept her going long after most of her contemporaries faded away, self-combusted or simply died. It feels entirely right that she – along with the similarly sensible and strong-willed Kirk Douglas and Olivia de Havilland – would be the last ones standing from the golden era.

Hollywood did its best to put Day out to pasture. By the 1960s, her wholesomeness felt out of step with the sexually progressive times, and her name became a byword for an old-fashioned kind of movie that had no place in the new era of American cinema. Who had time to remember the sweet innocence of Pillow Talk when the cool kids were making The Graduate and Bonnie and Clyde?

‘Day was fierce in her loyalty to Rock Hudson when others ran away in horror.’ Photograph: Silver Screen Collection/Getty Images

However, she proved to be far more modern than many of the people who treated her as a relic of the past. Her most famous onscreen alliance was with Rock Hudson, and it’s hard to think of another pair whose public images were so at odds with their private reality. Hudson was sold as a granite-hewn block of heterosexuality, when in fact he was a barely closeted gay man called Roy. Day remained his devoted lifelong friend, and when it was rumoured that Hudson was one of the first high-profile people living with Aids, Day was fierce in her loyalty to him when others ran away in horror. While the media indulged in lurid speculation, she invited him on to her TV show and played her song My Buddy over the soundtrack to cover up the fact that Hudson could barely talk by this point. After he died in 1985, Day spoke publicly about their closeness at a time when others thought you could catch Aids by holding hands with a gay person.

Day has been widely described as “a recluse” in the last few decades, but her friends have always laughed at the description, insisting she went out all the time; she’d just had enough of public life. And who can blame her? “My image, I can assure you, [is] more make-believe than any film part I ever played,” Day once said. It was a make-believe that fooled too many of us, right until the end.

• Hadley Freeman is a Guardian columnist