This depends on the context of course but in general, leaving an account helps with accountability, and like Matthew mentioned, with audit trails. Imagine the scenario where usernames are formed of the first letter of the first name, and the full last name, John Smith becomes "jsmith", but John decides to leave the company and soon after he is replaced by Jane Smith, her username would be "jsmith" as well. Preserving the previous user would stop an accidental impersonation from happening, which may also not be accidental in every situation.
Another situation may happen if the process of deleting a user removed everything linked to that user, recently Gitlab had a hard time partly because a staff user was flagged for removal and in the process a major database was taken down, in this case the decision of deleting a user was costly.
In general, if there is uncertainty on what would happen when deleting a user, the best option is to disable the user instead of deleting it. So yes, while there are security considerations, there are also operational concerns.