I would also like to add that piracy does not equate to a loss in sales.
There are plenty of things I would never spend money on, but I would check/try them out of they were free.
For example, a VR headset. I will never buy one since I get dizzy too easily generally. But, if there was one that I could try for free I'd try it.
So, If im using one at a library, it does not mean that a sale was lost. It just means I find the value of this thing to be less than what you are charging for it.