Let's Quickly Explain The Nerdy Rules Of Doctor Who
It's been implied before that the Doctor can't decide how he looks when he regenerates. The Ninth Doctor told Rose Tyler that he "could end up with two heads, or no head" after regenerating. Both the Tenth and Eleventh Doctors complained that they were hoping to be gingers (me too, bros). And yet Romana, a Time Lady from the same planet as the Doctor and a former companion, made regeneration look as simple as changing a sweater. A squishy meat sweater.
So why is it so easy for Romana to control regeneration and so complicated for the Doctor? Is it because he sucks? If regeneration is a completely random lottery and the Doctor could become any kind of creature in the world, how does he hit the "love child of Jeremy Irons and Christopher Walken" jackpot every single time?
Maybe it's because he can control his regeneration, but he knows that since he spends a lot of time on Earth (which is totally for special Time Lord reasons and not TV budget reasons), being a man is simply the easiest way to get things done. It's not that I think the Doctor really cares about his gender; it's more that he understands that the rest of the world does. He just lies about it to his almost-always-female companions because, well, that's kind of an awkward conversation to have.