There is a big distinction between the purpose of your distro package manager and the purpose of a languange dependency manager such as npm, pip, rubygems, cargo or composer.
While the first is for installing applications on your system (and also used for c libraries, because c has no official dependency manager), the second serves much more specialized purposes tailored for the language, such as
- os-agnostic (imagine the work in getting all them distros update just one package)
- compiles/postprocesses dependencies in deterministic ways