"It was the straw that broke the camel's back!" When you have bad habits - such as poor posture or you move in ways that could harm your spine, a simple action of bending over to pick up a pen could "throw your back out". This is because years of misuse has set up the situation where a sneeze could be the straw that breaks your back.
Learning how to move your legs and keep your back straight (or in neutral spine) during daily tasks and workouts is important to your spine's health. In physical therapy this movement skill is called hip hinging and in Pilates it is called hip disassociation.
To break a habit you first have to be aware of the bad habit and then through precise practice and exercises the correct movement must be done over and over again until it becomes the new habit or the new movement pattern. This is what is called motor relearning.
Please take a look at this short video which goes over how you can teach yourself, how to move without rounding your spine and take unnecessary strain off of your back. The video starts in sitting and goes into squatting and finishes with how to pick things up from the floor with good body mechanics (using the hip hinge concept).