My personal approach to the "write what you know" philosophy is to plant an idea/thought/question/emotion/experience I've personally had into a story. That way, there's always some measure of credibility to it. Other than that, I research the hell out of every other aspect as much as I can to hopefully have something of an idea of what it is I'm writing about.
I actually agree with it (to an extent), but it took a while to make the idea work for me.
The tendency of most people is to move straight to direct, personal experience, which is maybe related to how we tend to view writers. You know, the romantic alcoholics with insane and messy love lives and tortured psyches. Or the fact that a lot of literature is inspired by personal experience.
But that's only one way of knowing something. Someone who's studied a buttload on a particular subject has another kind of knowing, one that's just as useful for writing fiction.
I've written about lots of stuff I don't know about directly. I try to speculate based on what I do know and research when I don't feel like my base of knowledge if up to the task.
I write what I know... but it becomes a pain when I don't know something. Then I either have to research it, or I find my own solution around it. The advantages of preferring sci-fi and horror as genres.
I think for the most part it is legit, but in other cases it's always a good idea to expand your knowledge. There is always something new that you can apply to your writing that may improve it in the long run.