My impression is it's similar to physical books. Libraries buy/rent them per copy and loan them out at an equal rate. So authors should get paid similarly to if a citizen bought it from the store. Except if the library already acquired the book, then them leasing it to you does not give the author any money.