The issue as I’ve seen it stems from a lack of care, not a lack of experience or knowledge. In the pursuit of Getting Sh*t Done™, functions/objects/classes/methods are written quickly and for a single use-case. This happens regardless of language or application.
In this way, functions are often written for organisational or readability reasons, not for an actual separation of concerns or reusability reason. The best code is written by people who care, regardless of their background.