EDITED TO ADD: In fact getting LAPACK into the build if it's not already there is more of a maintenance imposition than just writing a couple of lines of code for this.
10 lines of code is easier to maintain than a whole dependency.
This is only true when you implement business logic, not when you implement algorithms.
A business wants to be able to change its logic to evolve how they do things. You keep trying to conflate these things but they are polar opposites.
1 large, complex dependency (plus the 20 lines of wrapper code to transform your program's internal data to initialise and call the library) almost never just stays as 1 large, complex dependency (plus 20 lines of ...).
But I was really just wanting to show, via irony, that the structure of the original argument is self-annihilating.
That is, "X almost never stays as just X therefore X is bad" applies to both branches reasonably, and is therefore invalid as an argument in support of one branch.
That is the precise premise of the hypothetical.
(Of course, one should always reevaluate the situation when making changes to code, but we all need a nudge sometimes when we're afraid of doing the wrong thing.)