Because there's existing libraries which solve many of the same problems which they inevitably run into and then re-implement them in JS. The "not invented here" mentality has to stop. Unless there's a significant reason to not utilize a library then it shouldn't be avoided. There's no good reason to replicate that functionality.