Everybody knows it's a bad idea, but it's a very, very, very common mistake to make in your twenties. It's survivable, sometimes even wonderful, but pretty risky. If you can get laid without needing to shit where you eat, I highly recommend it. If you can't, caveat emptor.
I don't think I've missed the point: I'm saying that a work culture that reduces your dating pool to your company's co-workers is terribly unhealthy, and promotes a lot of the problems w.r.t sexual harassment in Silicon Valley.
And definitely a reality of most industries, especially if you spend a lot of time in the office and little time socialising externally.