It would be a travesty not to kick things off here with perhaps the most celebrated androgyne in recent anime history, Haruhi Fujioka of Ouran High School Host Club (2006). Anime fans are likely to be familiar with the premise of this popular series, but have a summary just in case:
A frumpily-dressed new student named Haruhi stumbles into a clubroom full of handsome upperclassmen, and breaks an expensive vase. Unable to pay for the damage, Haruhi is forced to earn money by joining their club, which is essentially a PG-rated escort service. He must spruce up his appearance and entertain the school's female population on dates until he has cleared his heavy debt.
SPOILER: The twist is, he isn't a "he."
Males and females alike proceed to fall in love with her. I mean, can you blame them?
As per the jargon of the gender-bending genre, a "trap" usually refers to a male character who appears so feminine as to trick others into believing that he is female. Haruhi, then, might be considered a "reverse trap": a female superficially mistaken for a male.
"I don't really care whether you guys recognize me as a boy or a girl," she muses. "In my opinion..."
"...it's more important for a person to be recognized for who they are, rather than for what sex they are."
Ouran plays out as a comedy – and a great one at that! – but that doesn't mean we can't take important messages from it. Put it into social perspective.
The Host Club itself is an environment of superficial archetypes. In order to please their clientele, the other hosts assume deliberate personas corresponding to various anime archetypes: the Cute one, the Cool one, the Stoic one. However, Haruhi's appeal relies on no gimmick. Her official title as a host? The "Natural" one! For many of the club's clients, this natural approach proves most appealing of all.
According to modern gender theorists like Judith Butler, gender itself is a matter of "performance." It isn't something that is programmed within us, but something that is constantly being constructed as we portray gendered signals through clothing, mannerisms, and more. If gender is a performance, what does it mean to be a "Natural"?
It's easy, on one level, to say that Haruhi's performance as a male host is a performative act. At the end of the first English-dubbed episode, she invokes this by musing that, in order to keep up a male facade, she'll just "call everybody 'dude' and 'bro' from now on"...
...but then promptly laughs it off as a joke, and does no such thing. (For the record, in the Japanese script, Haruhi jokes that she'll start referring to herself with the masculine pronoun ore, but then continues to use the neutral pronoun jibun.)
In fact, there's nothing masculine about Haruhi's behavior. Any signals of masculinity or femininity are so perceived on pure account of others' perception, rather than deliberate intent on her part. Though obligated by circumstances to don a male uniform as a member of the Host Club, she is comfortable to let herself be perceived as either gender without changing much about herself.
The joke behind "traps" is hardly a joke about the characters proper. It has a lot more to do with the feelings of the viewers who perceive them. There's nothing inherently funny about a cross-dresser, but it's hilarious to watch suitors (or viewers) question their attraction to someone who doesn't fit their gendered expectations. It's a trap that we either love or hate to fall into, but a character like Haruhi is pretty free.
...Well, she's trapped in a strange club until she pays off a crazy debt – but gender-wise, she's pretty free.