It's part of the google eco system. It's integrated with android, google assistant, gmail, ... Chromebooks need web-only replacements for Outlook and Office.
It's also a freemium product, because you can pay for gSuite.
Get people to stay logged in to Google. Then when you do your regular google.com searches, Google knows exactly who you are rather than trying to figure it out for an "anonymous" searcher. I'd guess that alone is worth the cost of operating Gmail for free for everyone.
Companies pay €€€ to use it for business. Free version was good introduction.
One reason for using Gmail (which is generating ad money) is the integration with calendar. Getting travel bookings automatically in calendar is useful.