The golf swing works on the fundamentals of physics and bio-mechanics. The human body has mobility and stability joints and they alternate. For example, the ankle is a mobility joint and the knee is a stability joint, then the hip is a mobility joint.
The thoracic spine is the mobility joint which allows the chest and shoulder to turn and rotate in the swing. The lower back and upper back are stability joints that are not meant to rotate. So if a player was to be in a posture that locked the thoracic spine, the body will try to find compensations for the rotation. This could be in the form of sway and slide or moving up and down. This could also lead to injury at some point of time.
The attached image shows us how the spine should be relatively straight to allow for rotation which will help us swing the club more efficiently.