If anything, that job is best left to God. Shepard's killers could easily have maintained that they wanted only to rob him. Shepard would still be dead and his killers would still be dangerous criminals. Maybe O'Brien's killers were of the same ilk as Shepard's, only more wily. This is not to say motives are irrelevant.
Police often use motive as a tool to develop a list of possible suspects.
Self-defense is a lawful basis for killing. Establishing that motive or circumstance is essential to administering justice in those cases. Such distinctions serve to define whether a crime was even committed or not. Why it was committed might be of academic interest, and might help us understand the criminal mind, but this is outside of the mandate of the criminal justice system. Death to the gays.