The main reason is that the redirect document is created in a listener which receive the DocumenDeletedEvent causing a new DocumentCreatedEvent to be sent to all listener before the following DocumenDeletedEvent listeners are called.
The cleanest would be to move the redirect document creating creation in the job, after the delete, instead of a listener.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.