When mails are sent or received in gmail web account , they are always archived for convenience for the user to view them later on .
The apple mail application is configured to the web mail account and it mirror the settings and that's the reason mails are shown in archive folder of apple mail application .
You can open web mail account by entering the gmail address and password , click on settings and click on labels .
If you uncheck the box of show Mails in IMAP and click on save ( the future incoming mails will not be archived ) .
See this article Change your Gmail settings - Computer - Gmail Help
Read this article also Archive or mute Gmail messages - Computer - Gmail Help
And sent mails will never go to sent mail box because they are meant to move from the Apple mail application / or web account as in , outgoing mail server settings are done automatically in mail preferences > server settings ( like entering host name address , the web mail address and password , port settings , use secured shell layer ie . SSL ) .
In recent version of Mac OS High Sierra 10.13.3 you have not to manually set the settings to get it saved .
It will be automatically done from server end and that is very useful for Mac user , as if user could have entered the settings incorrectly the mails will not move from the apple application .
So this is a plus point.