This is because they have specialised muscles and ribs in the neck to lift their necks or lift their hood when threatened. There are 100-450 vertebrae in the body and 10-205 vertebrae in the tail. A pair of ribs is associated with each body vertebrae except for a few immediately behind the head.

Snakes have between 200-400 vertebrae with as many ribs attached. That is what makes them so flexible and helps them move along.

All those bones and the strong muscles protect the internal organs. The throat of the snake takes up the front one-third of the body. It leads to a really long stomach, which, like the throat, will stretch to the size of whatever the snake is eating.