Poor posture and neck pain are very closely associated. You can ask your friends with poor posture and they will you that they often suffer from sore muscles in their neck and shoulder region.
To understand this link a bit better we need to know what a good posture is and what the benefits of that are.
If you view the image you’ll see an image of good alignment of the head and neck. You can also see the Center of Gravity (COG) of the skull marked with the red arrow. It is very important that the COG remains over the cervical vertebra (neck bones) as this allows that muscle at the back of the neck hold the head upright with minimal effort.
If your head is shifted forward, you have something called Forward Head Posture.
Is this a very important question and understanding what implication a proper curve in the neck does for the long term health of the neck.
I attached x-rays to help illustrate my point in how a good curve in the neck can prevent premature degeneration (spodylosis) and permanent neck pain. The images are from two men that are both 50 years of age.
One of them played competitive rugby for 31 years and has no neck pain. The other had to prematurely retire from his profession as a dentist due to his aches and pain in his neck.