I reserve judgement, I kept my last dog when I had my first child.
He was ok whilst my son was a baby (though clearly not happy), but when he was a toddler, I spent the whole day telling the toddler not to bait the dog, or the dog not to snap at the toddler.
It got to the point where my toddler would enter the room and my dog would snap at him - he had been my baby before my first child, so he was obviously jealous.
I took him for more walks, gave him time with just me and the dog, but this didn't help. I was even advised to see a dog trainer, but it didn't help.
Finally, I asked my mother if she would have my dog, which she did. That way I got to see the dog still. It was very upsetting for me, as I loved my Max and he was such a soppy dog, just not with my son.
Obviously super animal lovers will not understand but if your dog bites your child, then another, it will have to put to sleep or sent to a specialist where it may not settle. Finding someone you trust to look after your dog if you cannot have dog and child in the same house is the kind, responsible thing to do.
Also, for those with a very active dog, who find that they are pregnant (without knowing, as I did) will not be able to devote as much time to the dog, who is perhaps (as mine was) used to 3/4 walks a day for miles, in all weathers. You can't take a baby out in that, across rough ground where you can't take a pram, in sleet/snow/rain/hail.
I don't think people are "happy" to give up a dog, it's not an evil decision, it's what's best for the dog. Now that my boys are both old enough to treat a dog well and can walk with me whilst I walk a dog, we have another dog (as sadly, my other dog died of a heart attack). I will never leave this dog with someone else, as I will never have more children.