True, there is a nontrivial amount of very useful software which could be written for universities across the science and engineering fields, but very little money to pay for it.
Generally, grant money cannot be spent on software so investment in tools is negligible.
That was the case for me and I graduated about 2 years ago. Professors were paying from their salary to get e.g. Matlab.
More specifically, software is usually not a direct expense so it needs to be paid from the grant overhead, but the university frequently wants to build new buildings or something else instead. It's the same for private government contractors.