I have bought a lot of books from Amazon, and if you look past the scrubbing with a marker, it's always some library within America - so yes even books from Amazon are just books taken from public libraries.
Of course if it's some popular in-demand book, it was almost certainly stolen. Most of the free library books I've scored are 50 year old textbooks about obscure/obsolete topics.