A university library has a large collection of books, chosen by a librarian and your tutor because they will be helpful for your studies. You could buy the books yourself, but that would get expensive.
Using a library means you can borrow books for free because sometimes you will just need a couple of pages and not the whole book. Borrowing and not buying is good for the environment too!