You store it in one page that doesn't interact much with anything – compared to storing your nsec on many pages that load content from all over the place and could have many many vulnverabilities. Like using a password manager.