The behaviour you mention is from npm install, which will put the same exact version from the package-lock.json, if present. If not it will act as an npm update.
npm update will always update, and rewrite the package-lock.json file with the latest version available that complies with the restrictions defined on the package.json.
I may be wrong but, I think the difference may be that python only has the behaviour that package-lock.json offer, but not the package.json, which allows the developer to put constraints on which is the max/min version allowed to install.
Curiosity. It began while trying to play around with programming, and finding a lot of talk and resources about Linux, and then trying it. 3 broken Debian installations just for messing around, then Ubuntu as a more permanent install, all of this alongside Windows.
Then I began using less and less Windows until I just deleted the Windows partition because I needed more space.