The snakes need to be able to recognize each other as possible mates through pheromones, and both snakes have to be ready to breed at the time of interaction. Hormonal fluctuations may even differ temporally between species to prevent hybridization by causing differential periods of reproduction. Also, different species may have different strategies when it comes to breeding. A female of one species may not be receptive to a male unless he does something physically in the proper way to stimulate her to engage in copulation. But yes, sometimes all it takes is one horny snake to meet up with a receptive snake of the opposite sex to make babies. There are just a lot of conditions that need to be met to get to that end result.