How does stretching my hamstrings help with back pain?

Decrease stresses . By making the hamstrings more flexible, your pelvis positioning can change reducing stresses across the lower back.