Someone could be exposed to HIV several times and not get infected, or they could be exposed only once and get infected.
Also, it is easier for men to infect women through unprotected sex than for women to infect men (women have biological predisposition to get infected easier).
It is possible that your girlfriend wasn't infected from the beginning of your relationship and for you to be sure for HIV negative status, you must to test after 6 months of last unprotected sex with your girlfriend.
Be careful and protected for other types than vaginal sex, too.
Best wishes!