It's a rarity but it happens, especially if you have sex with a woman who's positive for HIV or full-blown AIDS. In that type of scenario, there's no way you can have sex with her and not potentially, in all likelihood, catch the virus.
The issue is that a lot of us, heterosexual men, are not well-versed about the disease and think we can't catch it from a woman but we can if she's positive.
We still ignorantly think it's just a “gay” disease and believe that being straight shields us from contracting the virus. We can also catch it from stuff like blood transfusions, but that's a whole other topic itself.