That's where rescue assessment, carer notes, applications and trial periods come in. They force people to ponder relevant factors and calm the hurry for those that want a dog yesterday. Yes, some criticise the process. But I feel it's in the best interest of both the humans and the dog.
Unfortunately there are places to find a dog (or cat), that do first in best dressed with no trial and no returns. It's pretty easy to make a mistake if you aren't guided.