As per design, when we compose the new email it is auto saved, meaning it moves to Draft folder in the background.
When you click on the discard button it moves to trash folder as the email is autosaved already (which in turn moved to Draft folder).
In this default behavior if any email is in compose state when discarded it moves to Trash folder.
Expected result : Clicking on Discard button while email is in compose state should not move the email to Trash folder. In fact it should not move to any folder/views as well.