Car manufacturing in the 1970's was a mostly manual process and quality wasn't great. Then the Japanese brought in automation and sophisticated quality checks.
The investment necessary for these improvements was substantial and risky. The up-front spend was increased but manufacturing unit costs fell and the reputation for reliability rapidly drove up market share.
Investment is critical to any industry. Companies spend now in order to reap future benefits.
Sadly R&D spending in software development is patchy and is mostly directed towards the introduction of new products, rather than improving the existing process.
I suspect one of the main reasons for this is that the nature of software development makes measuring productivity hard and so return on investment is difficult to calculate. This is a shame because the potential for improvement in productivity is huge. There are few other industries with such a broad spread of productivity with differences in orders of magnitude not uncommon.
Here are the areas that I have seen R&D done in the past with enormous benefits for a development team.
Automated Functional Testing
The first automated functional test you write is usually the most time consuming. You need to investigate the technologies available and work out which is best suited for your particular form of software development. Then you have to battle your way up the learning curve and finally you have to document and teach others about the new framework. Spend time up-front preparing a solid and repeatable automated functional test framework and future projects will reap the benefits. Project managers and product owners will be more likely to agree to the inclusion of automated functional tests as the overhead is lower.
Automating releases is a classic win-win. Not only does it speed up deployment, but it usually makes it more reliable and cuts out a lot of wasted time with failed releases. Unfortunately most projects only think about the release process as they near the release date. The pressure is usually on by then and spending time on automation is rarely an option. Up-front investment in automating releases is good not only for the production release, but also for development, QA and staging releases. Even better, take the release process development outside of projects and provide them with a standardised, automated release mechanism.
Prototyping New Technologies
Risk goes up with uncertainty. Prototype a new technology before using it in anger on a real project. This reduces uncertainty and allows you to better plan future projects. Of course, there is always the possibility that your prototyping will reveal it is not as beneficial as you first thought. Better to do that in a research environment than in the heat of a project.