It's a complicated issue, but in general library budgets have been consistently shrinking for years/decades, even as the subscription costs for journal access from big for-profit like Elsevier skyrockets. It's even gotten to the point where universities with endowments larger than many nations' GDPs are struggling to afford publisher prices (see https://www.theguardian.com/science/2012/apr/24/harvard-univ...).
Decreasing library budgets plays into this, but at its heart I think that there's a crisis of purpose as well. By not investing in open access publishing infrastructure themselves and not modifying the incentives for faculty review and tenure, universities have put themselves at the mercy of these for-profit publishers and are suffering for it. It's hard to blame faculty who are vying for one of the ever-diminishing tenured spots for publishing their articles in the best journals they can, regardless of whether they'll be behind a paywall, especially when the bar for tenure keeps getting higher and higher.
So we find ourselves in a situation where universities and public funding agencies are paying academics to conduct research and do peer review, then faculty are giving the results to a for-profit publisher, who then sells access to the work right back to them at an astronomical fee.
I'm hopeful if not optimistic that at some point, universities might choose to break out of the cat-and-mouse game they're in by investing in open access publishing and incentivizing their faculty to use it rather than continuing to feed for-profit publishers' wild profits. I've seen some (too limited) action on the first part of that but pretty much none on incentivization part. Certain funding agencies are starting to require open access publication as a condition of some grants, but the change has been slow.