The legislation is the Animal Welfare Act 2006. In the UK it's illegal to cause any undue suffering to a vertebrate due to them having an advanced central nervous system and capacity to feel pain and fear.
If you can feed a snake a prey item that has been humanely euthanized then there's no real need to feed live and cause undue pain to the prey animal.
However if live feeding is the only way a snake will feed then I believe there is an exception the law takes account of.
Exposing an animal to a predator isn't seen legally as a humane way to euthanize in the UK unless absolutely necessary. I agree with this.
You could say snakes are exposed to parasites and other predators in nature but we wouldn't do it ha ha.