Digital tools as you've described could be used by the service to manage access to content. A book's author or publisher may object to the book being available for free. There may be limits on the amount of time you can read a book. Some content may be public domain but there may be versions of that content which the publisher has altered to in some way making some portions of the book not public domain.
Knowingly possessing something that was not freely provided to you or the public by the licensed owner, or otherwise known to be unprotected by copyright, is not legal. Just because a file is cached on your device does not mean you are the legal owner of that content forever.
There's a number of reasons you may be charged to download a pdf. It could be a means of legally granting ownership and sharing revenue with the content owner. It could be because the authorized provider of the content is simply charging to maintain the service you've acquired the content from. It could be both or it could be a sketchy website just trying to get your CC info.
This is coming from the perspective of someone in the US. I'm not sure about the rest of the world but imagine basic copyright laws are similar around the world.