Answer by Thomas Zerbarini:
You can never truly avoid bad things happening to you. You can minimize bad things by making good decisions, following the rules and especially follow your moral compass.
That being said, bad things will always happen at some point. Just as good things will happen. Remember, if we didn't have all the bad things in life then we would never know when all the good things were happening to us. You need the negative have a positive, a yin to have the yang and so on.