Though it’s true that Matthew Sheppard was deeply troubled (I don’t know what being HIV positive has to do with this), the perpetrators admitted and used the “Gay Panic Defense” as well as the robbery gone bad defense.
Personally, I do think they only intended to rob him but things got out of hand. But they did target him because he was gay (they admitted this, it was part of there defense).
I suppose the point was that he could have gotten HIV from drugs.