I’m shattered emotionally....

The Wife and I have fostered and adopted several shelter dogs. We have never had to return a dog but have picked up dogs that were returned by others. People return dogs for a variety of reasons.
It must be heartbreaking. A responsible owner knows when an animal is a threat to others and has to do what is right.
Some people are just not meant to be dog owners and they dump the dog at the shelter because they didn't have the time for the dog or the novelty of pet ownership wore off.
Bless you for doing the right thing. As sad as it is, a pet should not attack a person or another pet. If the pet cannot be contained, you have to do the right thing for yourself and others.