At a simple level it keeps the global namespace clean(er).
i.e.: It's effectively adding a layer of wrapping around the functions and variables within the library hence ensuring there aren't any namespace clashes with other functions that may be in use from other libraries, etc.