A sexless female psychiatrist, devoted to her work, encounters a fascinating mentally ill man. Suddenly, she is awakened to the joys of love and devotes herself to her patient, abandoning her profession in a sensual ecstasy of criminality. Women psychiatrists: they’re driven mad by love.

The character arc of Harley Quinn (Margot Robbie) from Suicide Squad, you say? Sure. But it’s also a thumbnail description of Dr Constance Peterson (Ingrid Bergman), the buttoned-up analyst who discovers passion and adventure in Alfred Hitchcock’s 1945 psychological thriller, Spellbound.

You’d think that the screen portrayal of women psychiatrists might have evolved over the last 70-odd years. But not so much. In the 40s, Hitchcock’s film was very concerned – an analyst might even say neurotic – about the contradiction between a professional woman and her womanliness. Constance’s devotion to her work is a constant source of comment and crankiness for her more or less amorous colleagues. “Your lack of human and emotional experience is bad for you as a doctor and fatal for you as a woman,” one would-be suitor sneers. The man Constance falls in love with, Ballantyne, an amnesiac possible murderer, is even more pointed. “As a doctor you irritate me,” he says. “I sit here swooning with love, and then suddenly you ask me a question and I don’t like you anymore.” Ingrid Bergman, you are made for love, not medicine. Cease your babble about guilt complexes, and kiss someone already!

Much of the discussion of Harley Quinn in Suicide Squad has focused on her sexualization. There’s been less discussion though, on the way that Harley’s transformation into the Joker’s boy-toy homicidal sexpot is based on a denigration of, and nervousness about, her professional accomplishments. Harley, like Constance before her, is dedicates to her task as a psychiatrist – but her womanly soul gets in the way of her dry, masculine goals. She starts out wanting to cure the Joker, but soon she’s inadvertently telling him she’ll do anything for him and procuring him a machine gun. Once she’s freed him the Joker electrocutes her skull to drive her insane, but really, the film suggests, there was something wrong with her already. That something is that she’s a woman and therefore easily distracted from her duties by a romance plot.

In the 1940s, a woman psychiatrist was still unusual; sexism kept most women out of the professions, and in the postwar period, just gearing up as Spellbound hit theaters, the cult of female domesticity in the US was as pervasive and uncompromising as at any time before or since. You’d think that in 2016, it would be easier, rather than harder, to imagine a woman professional with competence and dignity.

In fact, though, Suicide Squad is, if anything, more gratuitously sexist than the Hitchcock film. Yes, Constance falls in love with an amnesiac wanted for murder. But she correctly surmises that he’s innocent, and she does help cure him, even if she has to enlist the help of her patriarchal Freud-like male mentor to do it. That’s a lot more dignified than Harley Quinn, who falls for an avowed mass murderer and proves her devotion to him, and her rejection of her professionalism, by donning little girl stripper drag.

Suicide Squad: anxiety and a weird finger-wagging moralism. Photograph: Clay Enos/Warner Bros

Quinn’s not alone either. Many contemporary portrayals of professional women are shot through with anxiety and a weird finger-wagging moralism. In Suicide Squad itself, archaeologist June Moone (Cara Delevingne) gets punished for her professional curiosity when she’s taken over by the evil Enchantress, who (inevitably) parades around in the almost altogether. In Avengers: Age of Ultron, Black Widow (Scarlett Johansson), awesome super-spy, admits that she sees herself as a monster because she can’t have children, and longs for domestic bliss. In the recent The Killing Joke cartoon, Batgirl, like Harley, insists on turning a professional relationship into a romantic one. She talks about her crime-fighting partnership with Batman as a romance when her friend asks her if she’s dating anyone, and then, when she does have sex with him, she gives into emotional outbursts and violence, beating a villain almost to death – just as Harley would.

Even in the consciously feminist female-led Ghostbusters remake, the heroic women scientists and engineers don’t have any romantic interests. This can be seen as an affirmation of sisterhood and female independence; kick-ass professional women don’t need a man. But it also fits into the longstanding trope which pits women’s professional lives against their love lives. “We both know that the mind of a woman in love is operating on the lowest level of the intellect,” Constance’s mentor smugly tells her.

Men in pop culture generally aren’t confronted with this kind of disconnect between their heart and their professional accomplishments. In Spectre, Bond’s romantic connection with the leading lady helps him complete his mission. In Batman v Superman, Lois Lane is an asset to Superman, not a distraction. Batman may punch Superman in the face, but he never glances meaningfully at Lois while declaiming: “We both know that the mind of a Superman in love is operating on the lowest level of the intellect.”

For that matter, the Joker doesn’t cease to be a malevolent master of crime when he falls for Harley Quinn. The Joker pursues chaos and crime before finding Harley, and he makes sure that Harley joins him in those pursuits. Love makes Harley Quinn more like the Joker – and love makes the Joker more like the Joker. Only one of them needs to trade their self for love, and it’s not the guy.

In both Spellbound and Suicide Squad, “woman psychiatrist” is presented as an oxymoron – or as madness. Women’s place is in the home and in love; a woman dispassionately studying the brain must, therefore, have something wrong with her own brain and her own life. Homicidal madmen are one thing, but still, after 70 years, what really disturbs Hollywood scriptwriters is a woman with an advanced degree.