I saw the dismissals of parts of a couple of academic libraries and they didn't scan the dismissed books. It's just two examples, but I suspect it's the commonest case. The effort to scan lots of books in a short time is huge and the personnel is usually limited (dismissals frequently happen in bulk during reorganisations or restructures).
On the other hand, there are libraries, like the Biblioteque Nationale de France, which offer the service of photocopying or scanning rare books at a price that includes the payment of the copyright fees (side note: I actually used that service from another country, and as a memento for those who come here asking how to find rare books, I can say: learn to use library services around the whole world!).