One thing I haven't seen anyone mention, at least here in the US, is sexual harassment laws. What can happen is A and B have anything from innuendo and flirting to actual sex, and later if the relationship tanks one of them files a complaint against the other. "Today's fling may become tomorrow's filing," as one expert put it in an article some time back. One says it was consensual; the other says they felt coerced. Who's right? Just a big headache for companies too.
The trouble is it adds an element of excitement to an otherwise dull workday, or it makes one feel good about themselves (what guy doesn't like an attractive woman talking with him--and the reverse?), but as noted by others can create enormous problems between previously-equal co-workers.
Another reason to avoid it--for women--is there's already enough stereotypes about women "sleeping their way to the top" (an accusation made against Microsoft head honcho Bill Gates' wife Melinda) and the real fact that there are women (my line at work, on the day shift, had a supervisor like this, imho) who would use sex appeal on the job. She'd flirt, bat her eyes, tell about her sex life and make sure her tits were noticeable.
The point being that women like that make it more difficult for those who want to succeed at work because of their talents. If only one of ten do that, it's assumed the other nine will eventually, in the minds of some. So whatever one does has an effect far beyond her own individual situation.
I can think of situations where guys might be able to use their looks to similar advantage, but we rarely hear about it.