[spoiler]
From a methodological standpoint, libraries restrict the developer. They force you to do certain things in certain ways, providing a common ground for a single developer across her projects, as well as individual developers across a team.
From a utilitarian standpoint, libraries save time for the developer. JavaScript offers very few built-in utilities that are common in other languages, like sets, collections, or assertions. Some libraries address this problem. Other libraries simplify DOM operations, browser detection, etc. The point is that on the long run using a lib saves a lot more time than what is required to get familiar with them.
Then, from an architectural standpoint, libraries may give structure to an application . Now, this point does not apply to all libraries, and it may also be viewed as a subset of the methodological argument, but itâs important enough to be highlighted separately. Certain libraries, and frameworks especially, tend to dictate a structure for your code. In a time when sustainable growth for an (front-end) application is vital, namespaces, classes, promises etc. make sure that tens or hundreds of thousands of lines of code remain managable.
[/spoiler]