You are, I would guess, talking about American law. I'm talking about British law. Under UK copyright law, it is illegal to scan a book, even if you've bought a paper version of it.
I have bought numerous books in multiple formats - I guess I must be a moron

.