Not invented here syndrome, always create a class, always put a class in its own file, premature optimization blablah, don't use goto, this and that is bad practice in that language, don't optimize until you need it (but you later don't have time to profile, or don't really want to...)
Never-invent-here is a disaster waiting to happen.
Honestly, I think people justify this nonsense to themselves because they are scared to write original code, even if its incredibly tiny. The primary purpose of writing software is automation, if you aren't automating things with everything you write you are probably just an expense center. This is the financial way to say that your misplaced objectives make you unproductive and/or unreliable. It doesn't have to be that way.
Imagine world where you can import a single function and it'll bring only required dependencies, no more.
But, yeah, currently you have to weight whether it's better to write the code yourself or bring external libraries with some burdens.