So by your logic:
A gay man can screw a woman & remain gay?
A straight woman can have lesbian sex with a woman & remain straight?
A gay man can have a threesome, screw the man & the woman, and still be called gay?
A lesbian can have sex with a man and still be called lesbian?
Remember, there are many, many reasons for which people have sex. The best reason, is love. But there are plenty others: For companionship, for comfourt, for fun, happened while drunk, for money, for a favour.
If a lesbian gets raped by a man, she remains a lesbian. If she has to sleep with a man to pay he bills, she is still a lesbian. If she wants to sample what a man feels like, she is still lesbian.
Also, remember the "closet" factor - in many societies, being homosexual is seen as wrong. Many youngsters are expected to grow up "normal" and actually go as far as relationships and marriage with a person of the opposite sex, just to keep up appearances.
Now this is absolutely horrible, and I pity those souls who has to grow through that - but it still happens