Developers waste plenty of time (we're all on here chatting away for one!) but ask someone to even think about security seems to offend them in the way that asking a teenager to clean their bedroom would.
Now, with 20k node packages pulled in as deps for a couple of 10 line libraries, or with 100s of phars as deps often for 10 line composer sourced libraries, you often have almost no eyes on for that code reuse.
Devs just indiscriminately pull stuff in, don't care if a package is unmaintained, or was written by someone for fun 5 years ago and abandoned.
This model isn't sane code reuse.
At least with code written by an on site dev, one can have code reviews, sign offs, etc.
None of this even touches on things like hostiles taking over packages, either.
I'll put this another way. Do you audit every single non-core package installed from random sites, at each update, and all its dependencies?
Or, do you even audit each package, all deps, to make sure the project is active, and seems to have a competent admin?
Because code reuse logic means lots of eyes, and abandoned stuff, low use stuff doesn't jive with that.
One example, many popular frameworks. How do you audit every single piece of code brought in by, say, laravel? And how do you do it, if developers want to be able to reuse code?
Answer? You cannot. At all. You can't even reliably handle license compliance.
Yet, we use such frameworks, because security is not first, or even last sometimes. It's not part of the process, it's a thing to think about when a dev, a department has free time.
Many companies have a security team, an audit team. What?! You don't get secure by having people look at security after development, and then spend time fighting over fiscal concerns, to get a code re-write.
I think none of this will ever be fixed, until the CTO position becomes like the CFO position. Mandatory requirements, jailtime for CTOs if they breach certain regulations, and the authority for a CTO to tell everyone from board to CEO "no, thing X will be done".
Yet no one wants that, because of cost, and a desire to get to market first.