Delete a post and it goes to the trash. Delete an image from the media library and it is gone right away, file and all. One constant changes that.
define( 'MEDIA_TRASH', true );
WordPress defines MEDIA_TRASH as false by default. With it set to true, the media library gets a Trash view and a “Move to Trash” link instead of “Delete Permanently”. Trashed media can be restored like a post. The files stay on disk until the trash is emptied, either by hand or automatically after EMPTY_TRASH_DAYS, which is 30 days by default.
I think it is worth turning on for any site where several people manage images. Deleting the wrong photo is an easy mistake in the grid view, and without this the only way back is a backup.
It only works when EMPTY_TRASH_DAYS is not 0. Setting that to 0 turns off the trash for everything, media included, and then this constant does nothing.
Because the files stay on disk, trashing does not free any space, and a post that embeds a trashed image keeps loading it from its old URL. Space comes back only when the trash is emptied.
Further reading: wp_delete_attachment(), wp-config: Empty trash