Something that I've often wondered about for the past little while is how professional street photographers, or even amateurs for that matter, get away with publishing books, doing gallery exhibits, etc. when they don't have a persons permission to use their photo for money (maybe the street photographer likes more candid looks).

I realize the laws are different in each and every country, but the general consensus seems to be that you may take someone's picture in a public location, or from a public location, without their permission, provided it is for non-commercial use. So how does Elliott Erwitt and Fred Herzog and others get away with publishing (and of course selling) photos containing candid street photos? What about Vivian Maier? Surely you can't know for sure whether or not she gained permission to take people's photos (and most of them appear as though she didn't), so how can you legally publish them in a book and, of course, turn a profit?

And what about galleries? I know there is huge variability with that, as the photos could be donated, for example. But what about if the artist gains money from a gallery exhibition (for example, a portion of admission tickets sold)?

And of course there are straight prints that I've seen be sold or for sale (more by amateurs than professionals, though) that have people in them as the main subject. What about those? How can those prints legally be sold without prior consent from the subject of the photo?