Ever heard of the evolution theory of Darwin? The essence of the theory is that all life adepts to the circumstances it has to deal with over the passing of many generations. Snakes are no exception to this course. I do not know where snakes come from or which species their ancestors were. I do not know if snake used to have limbs, or if snakes are the forefathers of all species who do, as I will have to do some study for that for which I do not have time right now.
What I do know is that reptiles in general are the forefathers of both birds and mammals. The shape of a bird's foot resembles much that of a crocodile... That is a leftover from evolution.
And evolution can sometimes not only grant feature you need, but also remove features you don't need. In the human body the cecum is a nice example. It used to be important when we still ate raw meat. Now that nobody does it has become obsolete, but it does not instantly disappear, but slowly... It's already much smaller than it used to be in cavemen. Our great-great-grandchildren may not have it at all anymore. Some animals living in water used to live on land, and when you look at their skeletons the traces of that can still be seen, as some mini-legs, but barely developed since they no longer need them. I am not sure if snakes came from creatures that had limbs before or not. If they had, some trances might be seen in snakes... If they didn't then probably not... I frankly don't know...
The essence of the theory by Darwin has been scientifically proven, but the theory does not say what animal came from what, and that's why some people defy the theory based on stories being proven wrong based on Darwin's theory (neglecting that those stories are not the core essence of the theory, but only theories merely derived from the theory, but being theories on their own. Humans being descendants from monkeys is such a debunked theory, but that didn't debunk the evolution theory itself. And besides, the human coming from monkeys is not ENTIRELY wrong, as we likely have the same ancestor). When you closely analyze animals you can quite often find trances of their ancient ancestors. The word "evolution" only means "slow event"... Its opposite "revolution" is "fast event".