You were probably twisting (even just a bit) as you bent over. Transverse movements cause the majority of injuries like that because the muscles that govern those movements get the least amount of exercise.
One of the other benefits to squatting instead of bending over is that in addition to...