Update: I keep thinking about pulling this post offline. I'm torn between agreeing with everything I wrote here and thinking it's all a big sexist mistake.
Characters in Japanese anime favor iconic representations over realistic ones.
That iconic approach extends to narrative. The lead character of Masamune Shirow's classic Ghost In The Shell franchise (three feature films, two TV series, and two video games) makes its lead character Major Motoko Kusanagi female for iconic purposes.
Major Kusanagi leads a small team of Mobile Armored Riot Police (the literal translation of the show's name in Japan) - essentially, an epic SWAT team, or secret police unit. (In the manga, the totalitarian aspects of this got an interesting examination; not so much so in the other media.)
Kusanagi only ever has sex with women, and never enters into any romantic entanglements with anyone, and commands a fucking SWAT team. The role is a male role, or more accurately, a gender-neutral role. It's a role which is typically male in Western cinema, not necessarily male, and not necessarily female either. The character's only female characteristics are purely visual, and it's a key piece of the story that Kusanagi's body is entirely synthetic; she, like most of the key characters in Ghost In The Shell, is a cyborg.
This is in contrast to another highly successful Shirow franchise, Appleseed (original manga, three movies, and several video games), whose two principal characters are a man and a woman in an emotionally complicated relationship made further complicated both by technology and their work as members of what is essentially another epic cyborg SWAT team. You'll find in Deunan Knute every female characteristic that Kusanagi lacks, and it's not a coincidence. Anime's vocal characterizations are as iconic as its visual characterizations, and Kusanagi only ever uses masculine speech patterns. Since she does so with a female voice, it's possible this is the Japanese equivalent of David Bowie 1970s androgyny, but I think it's more likely that the character is simply not female in any meaningful sense.
Screenwriters say that your hero needs to pet the dog. You start out a script making your character sympathetic and likeable in some way. The assumption here is that you make the character likeable by having them do something. Kusanagi's femaleness serves the same purpose, but through an iconic pictorialization rather than a plot point. She engages in espionage and ruthless violence with a cheerful bloodthirst; giving her a pretty face, huge breasts and a leather catsuit serves the function of mitigating those negative qualities.
I sometimes think Chinese narrative takes a similarly iconic approach in a different way. Kung-fu movies often have the same character played by two actors. I always assumed it was due to small budgets and carelessness, but you can see it done in expensive movies that are very, very detail-oriented in other aspects of their production - for instance, Iron Monkey, a terrific Robin Hood story directed by Matrix action choreographer Yuen Woo-ping. Quentin Tarantino arranged its US distribution. At least two actors play the brothel owner at different points in the film. The same is true for a few other roles.
In America, we'd call this a continuity error and it'd be seen as a serious problem. Chinese action movies ignore this even when they have the budget to fix it and represent the work of the best people in the business. Yuen Woo-ping is a big deal in New York and Los Angeles, and a really big fucking deal in Hong Kong. The man can afford to hire a continuity person to run around with a clipboard and keep track of what the actors' names are. I once saw a Jackie Chan interview where he spoke about how he and the people he worked with in Hong Kong were constantly competing with Yuen Woo-ping and the people he worked with over who made the best kung-fu movies in Hong Kong. (If I remember right, they referred to themselves as separate and competing clans.) The decision to cast multiple actors in the same role is not a continuity error but an artistic choice made by a very successful artist.
In the States, that artistic decision would have to mean something like "this character changed so much that now they must be played by a different actor." That's not what's going on here; the artistic decision is that continuity just doesn't matter as much.
Iron Monkey makes a similar decision very, very frequently in its action scenes; if they shoot three takes of the same action sequence, they might show all three takes, which means that you actually see the action happen three different ways in a row. In some ways it makes for more nuanced performances. The movie even does the same thing with its dialogue. Everybody knows about the funny way that dubbed kung-fu movies have dialogue which doesn't match the timing of when the characters move their lips. I don't even know if a dub of Iron Monkey exists - I wouldn't watch it if it did - but this same phenomenon persists even when you watch Iron Monkey in Cantonese. Most of the audio is overdubbed, and there's no concern in the dubbing process with matching the exact timing of the lips. This is a not an editing mistake; it's an artistic decision, and it's almost the exact same artistic decision as before: continuity matters less than stylization. This is very similar to the Japanese emphasis on iconic characterizations; as long as both actors who play the brothel owner are wearing the same clothes, the audience is expected to figure out they're the same guy. Characters in Japanese animation look alike because the specifics of their faces don't matter; characters in Hong Kong action movies can be played by more than one actor in the same film because the specifics of their faces don't matter.
(This actor plays only one role in the film. This is Hong Kong's biggest action star, Donnie Yen, who plays a lead role in the film. The specifics of his face are assumed to matter.)
The interesting thing about all this in my opinion is the magical air that the movie takes on as a result of its heightened stylization. Since the stylization is not heightened compared to other, similar, movies from China, but heightened in contrast to American movies, the movie's magical quality is something which the original audience wouldn't experience, or at least, wouldn't notice as much. It's a characteristic of Asian cinema, like anime's iconic characters, rather than of this specific movie. It's very interesting to ask what American movies might look like with this same level of stylization.
American cinema has a place for highly stylized visuals, but it's generally cartoons. It's rare to find a high level of stylization matched with a high level of detail.