Have you ever noticed the bumps on the side of the highway? Those bumps are called rumble strips.
Just in case you doze off or drift too far to the side of the road, the noise and the jolt caused by the bumps will wake you up. The purpose of the bumps, then, is not to hurt you, but to protect you.
Likewise, when it seems like your life is drifting too far to the left or too far to the right, God is there to redirect you and, ultimately, protect you.