Composer is a dependency management tool. It allows you to add libraries as a dependency, so you don’t have to solve every problem yourself. You can make use of the solutions provided by others to save yourself some time and likely account for edge-cases you hadn’t even thought of. Why would you use dependencies? For »Read: "Composer dependencies in WordPress plugins"