Some people have multiple exposures to HIV, from either one person or several partners, and still do not get HIV.
Sometimes this is related to genetic factors, only some of which are understood. Most of the time it is just related to luck.
Although immune responses to HIV can develop in some people after frequent exposure, this is not well understood. Using condoms as protection against infection is still recommended.
Even people with a high level of genetic protection can still become infected.