No one can tell me that our species can write 1K ZX Chess (https://en.wikipedia.org/wiki/1K_ZX_Chess) – an entire chess game with intelligent opponents which only takes up 672 bytes – and yet we can't write an email client which isn't a million times that size.
But a lot of these webview kind of apps just download the whole thing anyways, so it's literally just a matter of if the bytes are classified under "application size" or "cache" by the OS.
(Precisely so they have the whole thing available for when you need to use it offline)
When it comes to the code, the reason that they are bigger is how apps are distributed and have isolated runtimes. There are several commonly used sdks and libraries but because of how mobile app distribution works, these common libraries have to be bundled with each app and are not installed as a reusable library (like you can do with Linux, for example).
The issue is that the Gmail app isn’t just an email client, it does way more than that. That doesn’t excuse the abusive behavior, but it does explain it.