It's one of the few things they do that I can't find a reason they would be financially motivated to do so, other than increase developers' opinions about the company as a whole, which is a good thing for all.
sorry to say, but https is not an altruistic move by google.
I'm willing to bet that the terms and conditions for both services allow google to reuse use the analytics infomation.
If privacy improves that will benefit the internet (privacy has real costs that don't involve state actors like hackers, etc). Many people, especially in developing countries, are afraid of transactions over the internet and use cash on delivery.
Better security = Greater trust of the web = Higher adoption = More ads.
No different to them working on Google Fiber.