Why move from informal book lending to an official library? Why charge fees?

Why move from informal book lending to an official library? Why charge fees?