Google is a large and complex company with many competing interests internally. Yes, I absolutely believe they would have created Gmail absent any advertising incentive. You have to remember how many seemingly random consumer services were created during the first decade of Google (say, 2000-2010), most of which were engineering experiments and had nothing to do with advertising.
The Ads org within Google is large but fairly compartmentalized and runs like an absolute machine -- there is no questioning that.
What most outsiders don't see, though, is how much independence all the other orgs have. For example, the fastest growing collection of stuff are the Hardware & Cloud areas, which account for probably 35000-40000 employees and are almost completely autonomous. If Ads show up on Google hardware products (let's use Google Home as an example), that's because the Home team exposed a service that allowed the Ads team to do it, not because the Home team was necessarily thinking about display/search ads during product design. In fact, there are many services Google provides where it's well understood that users will not tolerate ads at all (like Google Assistant surfaces).
The reason I responded to the parent was because they made a blanket statement, which, while true if you only look at the fiscal reports, is untrue in practice. One could certainly argue strongly that Google's inability to strike it rich with anything besides Ads is 1) the reason the stock has been in the [relative] doldrums for the past year+, and 2) why Google continues to invest in all sorts of things (like Wing, or Chronicle, or Stadia, or ...) that are pretty far afield, not to mention the pure & applied research happening inside the RMI/Brain org that's often much more academic than practical.
Besides search & mobile (admob) advertising, the only two major product areas inside Google that take a strong stance supporting the advertising mission are Youtube & Maps, but even then Maps tries to ensure it's surfacing useful, actionable, timely, and local information, which generally place it in a different category. Maps also have strong potential via partnerships for things like ride services, appointment bookings, travel, food delivery, and the like... some of which might technically be considered advertising but which manifests more like functional partnerships.