Using analogy: the wheel has a radius of 40cm and thickness of 10cm, I need a wheel of radius 30cm and thickness 15m. Sure, I can cut off the edge, mold it, and graft it onto the side, but it's a lot easier to just grind a new stone.
In real life: the old library covers 80% of my use cases. The problem is that it's not extensible, so in order to add the remaining 20% I have to fork it. Moreover, it has a lot of extra features I don't want, but get in the way when adding my 20%, so it would be less work to rewrite the entire thing from scratch with only the features I need.
Either way, now there are 2 similar versions of the same thing. Then someone else encounters the same problem, except their wheel needs ridges for all-terrain, or their library must be in the language that the rest of their code is written in (and FFI sucks). Now there are 3 similar versions. And so on...
Why not just make a "one-size-fits-all" library which can be extended any way? People have tried and will continue trying, but what they end up producing is the definition of "over-engineered": a bloated mess which is buggy, inefficient, hard to understand, and still manages to only cover 95% of my use-cases.
Don't get me wrong, code reuse (even legacy code) is a good thing, and there are plenty of cases where developers would be better off using an existing library. Maybe they'd to write a bit of glue code to fit their purpose, maybe they'd need to sacrifice some performance or non-essential feature (which is probably performance-related and/or a dumb idea anyways), maybe they understand this but simply choose to spend time writing their own unnecessary library because it's more fun.
But as our world becomes more complex and competitive, especially in web-dev, those couple niche extra features or performance gains or developer pain-point mitigations that only a full rewrite would provide, become worthwhile enough to warrant the rewrite.