Usually deleted users show up like this. Their posts are disassociated and anonymized leaving only a user card with their user ID, like this:
Users can also request disassociation:
However, I came across an answer and a question with a user card that resembles a deleted user (anonymous profile picture, no profile link, blank reputation or badges) but includes a username. How does this happen? If you delete your account, it doesn't keep your name.