It can be good advice but half the time for subjects like Phil, the library won't have sufficient physical copies for all the people in a class, and lots of people (me included) do not deal well with digital books and reading from screens. It's a 'play it by ear' thing for me.
I spent a fair proportion of my stipends at every level on books (around half my PhD stipend went on building a Sanskrit collection) - I don't regret this and now have a sizable library, half of which lives at work and half of which lives at home.