Not spaying/neutering a pet...but then trying to train it not to act like an intact animal...seems much worse to me than killing it. An intact male dog will go nuts trying to track down a female in heat that he smells; are you going to try to curb those natural instincts throughout the animal's life with training? I'm tempted to say "good luck with that"...but I couldn't really wish you good luck, because if you managed to be successful it still means that the dog is living its entire life doomed to eternal frustration. And the vast majority of people won't manage to keep the animal from eventually, somehow, getting loose and contributing to the population problem.
Keeping any pet is an inherently selfish act; you are confining and controlling a living creature because of the benefits you receive from it, in terms of companionship or affection or a sense of doing something good for the animal. But domestic animals are generally not capable of surviving in a feral state, and certainly don't live very long or comfortable lives when they are forced to try. And, since so many people don't/won't spay/neuter and do nothing else to prevent unwanted breeding, there will always be vast numbers of domestic dogs, cats and others that present a problem.
Either we kill many millions of animals that should never have been born...or we start to diligently spay/neuter our pets to control their out-of-control population growth. There's really no third choice.
Esox raises an excellent point, one of my perennial pet peeves: we have the Powers That Be concerning themselves with what they like to call the welfare of dogs, cats, fish...and yet any a-hole can have children.