I heard these people who volunteered to test an HIV vaccine ended up getting infected.
"I heard"
What does this mean? Did you read this from something credible, or is this just hearsay?
Also, how do you think "testing" a vaccine would work? By giving them the vaccine, and then exposing them to the virus to see if they get infected, while comparing it to a control group that was injected with a placebo and then exposing them with the virus. If people are being exposed to the virus, of course people are going to get infected, especially with a virus as highly genetically variable as HIV
a vaccine that'll just give it to me anyways.
Because the vaccine triggers your body's immune response, so that the body is prepared if the real thing comes. You're not actually sick in the same sense as if you get the actual virus.