There's a high likelihood that at least some of their work will be of value to the company—or, if everything pans out, they get a fancy new platform. The real motivation is probably somewhere in the middle (retention, product development).
This is a solid bet to make, especially when you are effectively not worried about the cost (thanks, ads!).
A lot of Google is heavily research focused like this: let engineers (mostly) freely explore complicated problem spaces. If it's a product—awesome!—see if there's market fit, and then grow it. If not, no problem; see where it, or parts thereof, can be applied elsewhere within Google.
Source: I worked there.