DI allows a generic runtime to instantiate and compose component graphs [via declarative initialization contexts]. The idea was we'd have reusable components. Somewhere along the line came Spring ("J2EE is too complex" lol) and before you knew it, any old application was using DI and now (per a scan of comments in this thread) everyone is quite confused what is the purpose of "passing variables to your functions" in this obscure manner.
> NEO was re-positioned as a Java system with the introduction of the "Joe" framework,[2] but it saw little use. Components of NEO and Joe were eventually subsumed into Enterprise JavaBeans
https://en.m.wikipedia.org/wiki/Distributed_Objects_Everywhe...
And we did just the same with objects factories and directories on the listed technologies.
Perhaps "What people like to blame Java for…" is how it was required to be done in Java.
Perhaps Java became a victim of enterprise culture, just like nowadays everyone is doing system level DI with Kubernetes orchestrations and WebAPI?
When those are the appropriate search keywords.
… perhaps came later, with embellishment
2004 https://martinfowler.com/articles/injection.html