The assumption is that if we improve flexibility and mobility in certain joints, we can move more efficiently during our golf swing and increase the length of our swing (specifically the backswing).
Improving efficiency of movement can help reduce the risk of unwanted movement and possibly injury. And then increasing the length of the backswing (without making other compensatory movements) can allow for greater club head speed on the downswing. Although, within the 'modern' golf swing, the goal is to keep the hips relatively still, and maximising the thoracic spine rotation.
Limited mobility around the hips (particularly lead side hip internal rotation) has been associated with low back pain in golfers (Saraceni et al., 2017). If we can move around the hips better, then we are less likely to need to move from the low back. And vice versa for those with limited hip mobility.
It's not to say that if you have limited hip mobility (or lead hip internal rotation) that you will get low back pain, but it could increase your risk of pain or injury. Other factors are important to consider, such as mobility of other joints (such as the thoracic spine), strength of the hips and back, type of golf swing and overall volume and intensity of activity (such as number of full golf shots, speed of swing and other physical activities).
As mentioned earlier with the modern golf swing, I believe this isn't always the best swing for many golfers (due the the rotational requirements of the thoracic spine and the separation between the pelvis and t-spine, which could increase the risk of injury to the low back (for example).
Being able to move a little move around the hips and utilise this in the golf swing (I guess somewhat like the 'traditional' golf swings) can help reduce the need for separation between the pelvis and t-spine and reduce the risk of low back injuries.
Furthermore, limited hip mobility is linked to swing characteristics such as sway, slide and early extension. Below is a vide of some simple hip mobility stretches. These can be a great place to start, along with some hip and core stability exercises.