“Google is a giant advertising platform.”
Google Analytics is free because your visitors pay for it with their data. Every site that installs it hands Google a map of who reads what across the web. Site owners get a dashboard they mostly ignore. Google gets the whole internet’s traffic logs and calls it a service.