As can be seen here, Stack Overflow used to delete up to 1000 inactive accounts per day since at least 2009. In the beginning, that number wasn't reached, but when it did, in less than three years, this adds up to 1,000,000 deleted users. This practice stopped in 2017.
I expect that the number of self-deleted accounts and users which were removed for reasons of spamming, sockpuppetry and/or trolling (mentioned by others in the comments) are much lower, but we'll probably need a ♦ moderator to confirm. As a baseline figure, the Charcoal project has detected 'only' 2,214 spammers on Stack Overflow since August 2015. We definitely missed some and not all of those accounts are deleted, but it puts the 1 million number in perspective.