I think there are two things you could mean by a department library:
a library run entirely by the department with little-to-no relation with the university library system
a library housed in the department (or nearby but specifically for the department) but managed under the university library system.
In my (mid-size public US) university, we used to have 2, but it got absorbed into the main university library. As far as I can tell, this mainly only had the effect of where the books were housed and not how it was run, so I think what I can tell you about how things are done now is still relevant. We also now have a small private library as in 1.
For 2, the university has a math/science librarian who is responsible for deciding what books to purchase. She would regularly go through lists of new publications and decide what she thought would be of interest/use to our faculty. There are many standard series (e.g., Springer GTMs) which we buy automatically. For books not in these series, I think purchasing history is the largest factor she uses to decide what to buy, but we can give her more input if we want. In any case, faculty input is requested to buy books we want that the librarian missed. (Occasionally emails are sent about this, but typically we just fill out an online form when we come across such a book.)
For 1, our unfunded department's "private library" started with donations from retiring faculty or just books people no longer want. Occasionally the main library will also offer us things they don't need. (If this were funded, probably our library committee would decide what to purchase.)