I think Euphoric's answer is just one piece of the puzzle. It's a more direct answer to the question in the title, but, to my mind, not quite complete. I'm not equipped to piece together the whole thing, but I'll try to contribute what I can.
Japanese culture seems to have been fascinated with gender themes all the way back to its very beginning. Shinto mythology apparently features a transgender deity called Ishi Kore Dome no Kami, and some of the creation myths incorporated homosexual themes. Source.
Japanese kabuki theater originally had both male and female actors, but starting in the 1630s, the Tokugawa shogunate banned women from appearing on stage due to the increasingly erotic nature of the plays, so male actors began playing all female roles. (Kabuki, "Transition to yarō-kabuki"). An all-female theater group called the Takarazuka Revue was established in 1913; women play men's roles in their productions, somewhat like the common anime trope of a class putting on a production of Romeo and Juliet or Sleeping Beauty with a boyish-looking girl playing the male lead and a girlish-looking girl playing the female lead. In more modern times, visual kei street fashion often emphasizes an androgynous look for men and women. The Wikipedia page on Bishounen discusses more about both historic and modern aspects of how Japanese culture views androgyny and gender blurring.
So Japanese culture already had a long-established tradition around gender issues. I believe the prevalence of traps and genderbending in anime is a modern expression of this tradition. As Euphoric says, because anime and manga are drawn, they are beyond the bounds of the physical. They don't need to find an actor who's a little androgynous and dress up that actor to accentuate those features. Anime and manga can actually just draw a girl and say it's a boy, or draw a boy and call it a girl.
As to the last point about potential cultural bias, it does seem that Japanese culture deals with these themes in a unique way, though similar themes are not unheard of in the West. The situation with kabuki during the Tokugawa period, where all parts were played by male actors, is similar to the situation in England during Shakespeare's time: female actors, though not officially banned, were highly uncommon. Young boys often played female roles. (Wikipedia, Boy player). This makes Twelfth Night and other plays with cross-dressing a sort of triple-layered metafictional joke: at the time Twelfth Night was first produced, Elizabethan audiences would have seen a boy playing a woman who was in disguise as a boy.
There are also modern Western works where men disguise themselves as women or vice versa, e.g. Mrs. Doubtfire, Ladybugs. (Whatever you think of their quality, they do exist.) In Neil Gaiman's Marvel 1602, Jean Grey disguises herself as a boy, as does Arya Stark in George R.R. Martin's A Clash of Kings.
However, I hesitate to call any of these "counterexamples" to the premise of this question. Aside from Shakespeare, the Western works I mentioned don't really use this device to explore gender issues. They might, just a little, in a small way, but mostly, it's just for comedy or for practical reasons, like blending in with an all-male mercenary troupe. Ranma 1/2 is also mostly comedic, but other such anime and manga actually explore gender issues at some depth. Traps like Haganai's Yukimura, Mariya Holic's Mariya, and Otoboku's Mizuho are designed to be attractive to heterosexual male viewers, while also provoking a feeling of confusion or discomfort. That discomfort can be capitalized on for comedy, as it is in Haganai and Mariya Holic, but this method is very different from the way Mrs. Doubtfire creates comedy.
There are highbrow works of literature and film which explore gender issues in the same way that these anime and manga do. But the anime and manga examples are not highbrow; they are relatively popular, and created for normal readers and viewers, not for literary critics. Haganai and Otoboku are even aimed at a young, male audience, not an audience known for its openness to discussing gender issues. It does seem that Japan has a unique tradition around gender issues in fiction, and the modern use of traps and gender-bending in anime and manga is a modern continuation of that tradition.