That recipe is similar to a home recipe for snake repellent. It also repels a lot of other pests including rodents and many flies (not mosquitoes).
The reason it's effective is that snakes, many rodents and a lot of other pests hunt by "smell". In this context, "smell" includes tasting inhaled airborne microparticles which is how snakes and many insects actually use the sense of "smell".
The mixture is so powerful that it disrupts the ability to hunt for food, driving the animals to other places. It carries "knock-on" effects because the first to leave are usually the rodents and small reptiles which are prey for snakes. So the anakes are doubly affected - no prey scent particles and unpleasant, overpowering other particles.
Great for eliminating potential disease vectors in and around your home/crops, and safe, too. But your dogs and cats won't be happy.
FYI.