Hamstring injuries, why? If you are on the hamstring merry go round, you need to slow down and work out where it is coming from.
Posture would say you tend to stand on one leg, subsequently you turn one of your glutes off pre-disposing one of your hamstrings to be hamstrung. One side the glute does not work, as the primary hip extensor this means the secondary has to do the work of both. Good luck with that.
On the other side it will be working more, predisposing it to tightening to the degree where it locks up, similar to the other side but with the twist where the extension now happens through the hip due to the glute tightening (locking) up.
The answer, you were given two legs so stand on them evenly. This will take time to change the motor recruitment pattern but it is doable if you want it badly enough! With your legs vertical, feet facing forwards, slightly rotate your knees out. Two things will happen, your arches will lift and your glutes will fire. Do this at all times when you stand and enjoy the difference.