On some subconscious level it seems inherently natural, I think, to presume that authors who are male write male characters, and female authors write female characters. Or at the very least, that they should be most comfortable doing so--should be able to just slip right into the skin of a same-sexed character like a good pair of jeans.
I used to believe it; as a teen I'd read a book (say, Lirael or Sabriel by Garth Nix) and get perturbed by the fact that a guy was writing from the point of view of a girl. How does that make sense, I'd think? Isn't that ... weird? But at the same time I was writing male point of view characters along with female ones and it wasn't weird for me to do. Just other people.
(J K Rowling originally went by initials, rather than her name, because the Harry Potter books were theoretically aimed at boys. And boys don't read girl authors.)
Over time, and maybe this is weird, I've become more and more comfortable writing male characters and less comfortable with female ones. As a kid I liked a good, convincing heroine. Somewhere that disconnected and I got convinced girls didn't make good heroes. Maybe it was Phillip Pullman's Golden Compass series, because, sorry, but I read the first one and enjoyed the adventure, but positively hated the heroine. I could not identify, when writing, as a girl.
Or maybe it was the fact that I was home schooled for a handful of years with two brothers as my main source of interaction--and with bad memories of the girls in grade school who could be angels one minute and demons the next. I never liked girl things, like hair or clothes or dolls, even when surrounded by girls. Make me play house and I'll kill you because, fool, I actually had household chores to do. They were not worth pretending about.
Pretending was for fantastical things; unicorns and fighting dragons and adventures. Not folding clothes and cooking tomato soup.
So, by logical extension, if girls either made tomato soup or became really annoying heroines, I'd have to be a guy. No need to psychoanalyze me too much because none of these thoughts were ever articulated even to myself. I just felt out of touch with being a girl.
Whenever I start thinking about a story, even today, I almost instinctively formulate the main character as a guy--exceptions come largely when the character has to be a girl for the story to progress. I'm a little more in touch with being a girl now than I was, say, ten years ago, but still ... old habits. I'm comfortable in the mode of heroes. And yet whenever I sit down to write a story where the main character's female rather than male, it's strange to realize how it is different. There's a mental shift that has to happen for me to get inside a girl's mind. It's kind of uncomfortable, and weird, and when I'm writing it can be somewhat painful, even. But when I go back and read, these stories are all right. Not bad--nothing wrong with them. But once I finish writing a heroine and move on to a hero, things flow so much more smoothly.
I do hope, at some time in the future, to get over this barrier, whether it's actual or mental, and to be able to shift from hero to heroine without pause. I am a girl, right? So I should be able to write a girl like me.
Sure. Only problem is, that turns out being a guy.