Laurel pointed out the related legal basis in a link, but the full context is a bit more complex. To quote the direct CC FAQ on this topic we find:
What can I do if I offer my material under a Creative Commons license and I do not like the way someone uses it?
What can I do if I offer my material under a Creative Commons license and I do not like the way someone uses it?
[...] Second, licensors may waive the attribution requirement, choosing not to be identified as the licensor, if they wish. Third, if the licensor does not like how the material has been modified or used, CC licenses require that the licensee remove the attribution information upon request. (In 3.0 and earlier, this is only a requirement for adaptations and collections; in 4.0, this also applies to the unmodified work.) Finally, anyone modifying licensed material must indicate that the original has been modified. This ensures that changes made to the original material–whether or not the licensor approves of them–are not attributed back to the licensor.
So there are two things here: 1) when you delete an account you basically waive your attribution requirement. This wouldn't require SE to remove your name, but it definitely allows them to do it according to the license. 2) there is a requirement for SE to remove the name if the owner of a CC-BY-SA-4.0 work requests removal. Note that this doesn't fully apply to content licensed to SE under an older CC license, but in those cases 1. still applies.
Also note that this means that if a user doesn't waive their rights, nor requests to be disassociated that SE can't remove the attribution without also removing their content (e.g. an underage user would have to be deleted with their content unless they waive their rights). Not sure how SE currently handles this.