Yes, but the drug costs $1,000 per month, and must be taken every day, and has side effects. Furthermore, no guarantee that the drug will prevent HIV 100% of the time. I'd say using a condom is a million times easier.
It's made for people who are HIV positive in order for them to stay alive. For HIV negative people taking it, they have to pay big money for the drug, take the drug religiously every day, and even after the big expense and side effects, the drug might not even prevent infection with HIV. Very few people are willing and able to spend that type of money and tolerate those types of side effects for something that is not guaranteed to work in 100% of exposures.