All joints are not created equal. The joints in our body are in a constant balance of mobility and stability. Some joints are made with more freedoms of movement than others which is often balanced out by the stability of the muscles around the joints. Dysfunction and pain arise when this balance is disrupted.
For example, hip stiffness can be brought on by a tight hip capsule which is often a compensation of an arthritic hip joint. If your hip is stiff and presenting with less motion, your lumbar spine will provide extra movement to compensate for the stiff hip. This can lead to hypermobility (think extra motion) of the lumbar spine which can lead to low back pain.
If your lumbar spine is hypermobile for compensating for your stiff hip, the muscles around your spine will often increase in resting tone or tension to protect the joint. Specifically, your hamstrings will increase in tone and adaptively shorten (literally shorten up) to create its own sense of stability. Unfortunately when someone has back pain, the first thing many people reach for is a strap to stretch the hamstrings which may not be what lumbar spine needs at that time. Instead, you should be first strenghten the core, improve the mobiltiy of the hip and than think about restoring the proper length of the hamstring muscle.
To be clear, most stretches are effective however many people immediately stretch a stiff or tight joint which can be doing more harm than good. The next time you get that urge to stretch be sure to talk with your physical therapist to analyze your movement pattern and lead you in the right direction regarding proper mobility and stability for your body.