In some cases this is based on a voluntary contract and in some it is based on a public lending right. https://en.wikipedia.org/wiki/Public_Lending_Right