I recently watched The Sandman. So far, Lucifer has been portrayed as female. I am confused as to how this is possible. Lucifer is male in the original comics and in WB's previous adaptations of them, so why are they now being portrayed as female?
Lucifer was originally quite androgynous; but choosing male pronouns. Often portrayed in the graphical novels as having no genitalia at all. The inspiration for the character's look was David Bowie, himself a rather androgynous character in the way he presented his stage personas to the public.
Many of the angels are portrayed as being able to present any appearance to humans.
To answer your banner headline directly, Lucifer was never portrayed as male or female, except in the out of canon Tom Ellis version. In The Sandman Lucifer is still not portrayed as male or female, merely played by a female actor.
The spin-off show Lucifer was the one that actually broke this canon by having Lucifer be clearly male [Ellis's only real concession to the canon character was that he sang quite a few Bowie songs in the early series], not the later Sandman show. Lucifer went on to change so much from canon that it was decided very early that Tom Ellis could not be the one to play Lucifer back in canon.
Neil Gaiman had this to say…
Author Neil Gaiman made this point quite clear on Twitter, when one self-described "Sandman purist" confronted him regarding Christie's casting, saying he was annoyed by the "constant recasting of male characters to female actresses." Gaiman replied that he suspected he was a far greater purist when it came to The Sandman than anyone else, and that he had no complaints about "a genderless androgynous character without a penis being played by a fabulous actor who fortunately also doesn’t have a penis."
Back when Gwendoline Christie was first cast in the role, small-minded bigots with too much time on their hands lashed out at this and other casting decisions which gender-flipped or race-swapped various characters from the comics.
The Sandman creator Neil Gaiman has since responded to many of these online trolls using both facts and sarcasm to point out how absurd it all is:
"How exactly has the character changed?" he asked one who challenged changes from the source material. "Is it the penis? It’s okay. Lucifer in the comics didn’t have a penis, and I don’t believe Gwendoline Christie has one either. The dialogue’s the same… it’s that Gwendoline’s taller than the Lucifer in the Sandman comics, isn’t it?"
Well, the person lucifer was based on in the comics - David Bowie, was dead
In the sandman universe - Lucifer's an angel and didn't have a gender. The depiction was meant to be androgenous - from this interview on the inverse, from Neal Gaiman himself
So the people that were getting all upset that this, when you talked to them, they weren’t Sandman fans. The people that were getting all upset about Lucifer’s casting (Gwendoline Christie) and were up in arms about the ‘gender swap,’ again, weren’t Sandman fans because then they’d know that Lucifer looked kind of like an androgynous David Bowie and doesn’t have any genitalia because they’re an angel.
And from the same interview
I wouldn’t have cast David Bowie as he was before he died, because the whole idea was that Lucifer is meant to look like a beautiful angel.
This is what a accurate to the 'art' lucifer might have looked like, had it been years ago. And well, you couldn't quite tell their gender can you, just off the art.
However with both Sandman, and the other ongoing Neil Gaiman Series - Good Omens - I think to an extent, especially after the bit of a mess that was American Gods, I think Gaiman went with the spirit of the stories and the 'right' casting over slavishly following the source material he wlrked on.
Basically as with the 'other' swaps, like death not being a young white goth, and Constantine being Joanna Constantine, not John Constantine, and Lucien/Lucienne it was because the actor was right for the role.