You can help prevent some injuries with better training, stretching, hydration (looking at that hammy Shady!), etc. This also includes proper technique. Of course plenty of injuries are also sheer luck (Ty getting rolled on) and some are because a previous injury wasn't properly handled.
Definitely think in our case it is a bit of both.