In General, Snake takes the place of Ant's nest to stay and develop their family. You can see these ant's nest outside of the towns. In fact, you can see these ant's nest outside villages near shrubs and bushes.
We have to agree that scientifically snake will not drink milk and eat eggs. But there is a scientific reason behind it to place eggs and milk next to the Snakes Nest in India that we should know.
In ancient times, Human's biggest threat was snakes. Due to the dense forests, human presence and developments were very limited. Snake's population was more than human. Because of this, death due to snake bites were more. People afraid of snakes and they started migrating from place to place.
In Hinduism, People don’t kill any living beings. People who follow this religion, always respect all the living beings. So, they have decided to control its re-production rather killing them.
Snake's breeding is very different from other reptiles. A female snake secrete a special odor (Paromon) and it will sniffed by male snakes for mating.
Humans decided to control the reproduction by means of placing eggs and milk combination next to the Snake's nest. After days of time, eggs and milk will start producing different set of odor which will control the odor of female snake's odor. Because of this odor, for the male snake, It’ll be very difficult to find the female snake to mate.
Humans started practicing religiously to continue this practice to generation to generation.
But, at present, Snakes are part of our ecosystem and they play an essential role in pest control. They occupy an integral position in the foodstuff chain as a prey as well as a predator. We have to protect them.