Or, more likely, Niantic was doing badly (financially) and they wanted them gone. If they were doing well, why would they let them go?
Google has a lot of services and products that don't earn them money directly (Chrome is probably the biggest one, Android another), but which do provide Google indirectly - Chrome's initial focus on speed meant lots more page views which caused lots more ad impressions which caused more income. In theory.
The argument about distraction still holds.