I think you'll find this is traditional religious behaviour and not actual legal behaviour in India.
You'd also be surprised what happens out of tradition in China, Vietnam, Russia and other countries.
India itself has a legal system based on the UK (thanks to British colonisation) and not dissimilar to Australia. New Zealand, etc. but with a vast population with poor general education it seems that bizarre stories always emerge.