They get a cut every time you spin up a VM on AWS, I imagine that's what provides the bulk of their profits. Even though Ubuntu is open source, it's trademarked. If AWS didn't want to pay Canonical, they'd have to do one of two things: either provide Ubuntu unmodified or relabel it and call it something other than Ubuntu. Unmodified Ubuntu probably doesn't boot on AWS, so that's not an option. They tried avoiding payments to Red Hat with their "Amazon Linux" option, but customers far prefer the branded RHEL and Ubuntu images.
AZ Linux is useful sometimes though, because it has all the AWS niceties installed by default, like the SSM session manager, or the ECS-optimized image.
Is anything known that maybe their snap efforts with the snap store are maybe a tactic to get some profit from end user desktop ubuntu down the line?
If their plan works out and it becomes the linux app store they could make it attractive for proprietary software vendors to sell stuff through it, and charge a percentage for being the sole gatekeeper to the snap store like apple or google.
There's much unhappiness about "snaps", the "store", and that Ubuntu 20.04 is too closely tied to the mothership. Some people are moving to Mint for that reason. Yes, there's not that much of a tie to HQ yet, but remember how Windows slowly went from a standalone OS to "software as a service".
I'm writing this from desktop linux (so I like desktop linux) but the market for linux in servers and other non-desktop uses is much bigger. Yes they target desktop software with Snaps, but also non-desktop software, which is where Snaps started originally as well. This includes being used in commercial products like some Dell networking gear (IIRC), which I imagine is another source of revenue.
Yeah they’re making a killing in the mobile devices market.