Walking and running is great for you when it’s done PROPERLY.
What do you mean when done properly?
I can walk fine; doesn’t that mean I’m doing it right?
The answer is not always. When we walk or run muscles have to contract in certain groups and orders so we can move our arms and legs. If our muscles weren’t working together then we wouldn’t be able to walk in a straight line.
The real question is how walking contributes to my neck pain. When we take a step our arms follow and swing the same. So if you take a step on your right leg then your left arm swings forward. Then when you bring your left leg back your right arm follows it. This is the normal mechanics of gait. Your arm mimics and follows the opposite leg. When you walk if the stride of your right leg is longer than the stride of your left leg then you will immediately have muscle imbalances. Some of the muscles that deal with the arms and shoulder movement during gait attach to the head and neck, and if there is muscle imbalances this can contribute to a neck complaint.
Most injuries take time and have a cumulative effect. Walking poorly is the same way and will likely take time to show as a problem and one large step should not create an injury. If this is the case then there are bigger factors in play that need to be evaluated.