I had sex with my best friend's bf

For over a month I was living with one of my best friends and at the time a guy friend of hers who had nowhere else to go. They both told me that they didn't really like each other and were just ready to live apart so they could see other people. One night we all got super drunk. Somehow I ended up having sex with the guy. It also was my first time. The next day the guy and I were like never again will that happen. But it did. At least twice a week for the over a month I was there. Then one night I heard them having sex and I knew I couldn't stay there anymore. So I moved out. Then about a month later I find out from friends that they are dating. Both still telling me that they really don't like each other. Then why are y'all dating? I had a week moment when my friend went out of town and hooked up with him all weekend. I know it's wrong and if my friend ever finds out it would hurt her, but I'm so pulled to him. It's not like me to be selfish or purposely hurt someone and I know I could never really date him. But I also can't say I won't have sex with him again if the situation allows. I don't know what to do.