The nuance is that you can have a NI number, then have your visa lapse for whatever reason - you still have the NI number. Hence the requirement to prove your right to work through another means.
Previously you could use proof of British nationality or a physical biometric residence card - but they've been replaced by the digital share code system (which tbh hasn't been too bad)
Sorry I worded that poorly - I was trying to make the point that citizens prove their right to work using passport/birth certificate, and until recently visa holders used a physical BRP, and now a digital system (which oddly enough uses your expired/redundant BRP number as a username)
The prove right to work is a slightly newer thing thats additional