Apple - Swipe to Archive instead of Delete in Mail.app on El Capitan
Open Mail > Preferences > Viewing and change "Swipe Left To" from Trash to Archive (5th line down).
For macOS Sierra, its a little different.
This functionality does exist. Please see Mail > Preferences > Viewing > "Swipe Left to:"