Different shelters have different policies. There are quite a lot of places where it is a few people who have set something up and are adament they will never put a healthy animal down. Other places, such as the RSPCA and others which are also limited by resources and have more of an infrastructure tend to have policies of some sort.
Like I say, they will vary, but generally places will euthanise very sick or very aggressive animals early on. It doesn't make sense to spend charity money in that way, when you could use it to help an animal more likely to be rehomeable. Then places may have to start making decisions - animals which are old, ill, or generally not likely to be rehomed easily may have to by put to sleep to make room for something else. For example, it seems wrong to turn down a young, healthy, friendly dog but keep an old, diabetic, aggressive dog in the hope that you may find someone at some point happy to rehome it.
For people who are saying about getting pets from friends who have pets who have had kittens/puppys. That is just as bad as a breeder to a large degree - many people think it is nice to let their pet have babies (plus the added bonus of selling them and getting money for them!), when in reality all they are doing it ending up with another 4/5/6/7 animals to find homes - rather than people rehoming them from shelters.