The leg press puts alot of tension on your hips, especially if it is an incline leg press. See if your hips posteriorly tilt(butt tucked under) during your leg press, especially at the bottom of your lift. If this happens your lumbar spine is not supported and all that tension placed on your hips get transferred to your lumbar and sacral spine! This will surely aggravate a preexisting injury or possibly lead to a new injury.
When doing a squat your hips are in a neutral position or anterior pelvic tilt position(butt out). This is a more natural position for your spine where it can be easily supported by your deep abdominal muscle and spinal erectors. This reduces compressive forces and stress on each lumbar vertebrae, and each intervertebral disk.
Hope this helps!