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 ID for working system is https://www.gov.uk/prove-right-to-work , with its digital ID "share code" https://www.gov.uk/view-right-to-work
(what does the digital ID scheme add to this again?)