Why is there so much stigma around rehoming dogs?

As the title says... why?? Surely if you are in any kind of situation where it is no longer safe or practical for you to keep your dog - you should pass them to a better home right? It shouldn't matter how long you've had the dog. It shouldn't matter what your reasons are. If you aren't happy and well, the dog won't be happy and well so why not find a loving, capable home? I completely understand that it's no small thing to take in a dog and I'm not condoning serial rehomers who just take in animals without any thought etc. But seriously? People are so nasty about you "giving up" on the animal. I just honestly do not understand it at all.