Google puts out free or cheap services and devices because they're trying to draw users to their platform, which gathers metrics about usage. These feed into the services, but they also feed in to Google's need to be a better advertising platform. Although we think of Google as the company behind the eponymous search engine and Android phone, it's actually an advertiser. I'm not sure if it's still in the 95% range, but it's still high. I have a 7" Nexus tablet which (for the time) was a great tablet at an insanely good price. But I knew I was essentially giving up information about what I read, what I listen to, and what apps I used in exchange for the free services and discounted device.

In contrast my Apple devices aren't cheap, and there is less collection of data with the intent of selling my attention to third party advertising clients, but they are more expensive and I pay an iCloud subscription fee. For the most part the Mac software doesn't suck and works reasonably well. I don't love everything about it but it's more appealing than Picasa for photos. I do pay for extra storage on Google to back up my pictures (over 100 gigs of family photos). But I am definitely paying more Apple in a direct sense (buying computers and phones + iCloud) than to Google (Google Play and 1 device). Apple's margin on hardware is high, but they make a quality product (for the most part).

What I give Google is information about myself, my work, my family, the music I listen to, the books I read, and anything and everything I ever searched for. They're pretty open and transparent about this, and I pretty much understand what I'm turning over in exchange for their free stuff. See the Google dashboard on you. If there's an application or service hosted by Google, I pretty much understand their intent is to extract data from that service or application.

That works for most people, even though they really don't understand this exchange or think about it. Free is a powerful lure and most consumers have come to expect not to pay anything at all for software and services. That's why they download a free game and keep playing it even when they find out it sends the contents of their address book off to some weird holding company. It's also why they get suckered into free games (because 4.99 is just too expensive on an App store) and then spend multiples of that amount in in-game purchases. It's why they're willing to turn over even extremely intimate details of their life for free e-mail or messaging services.

But the incentive for Google is not to make great software or hardware because that's how they make their money. Their incentive is to roll out services which help them collect information to feed their need for information about your tastes and behaviors. If that photo app you're using doesn't really give them more information, there's no incentive to make it better. Apple has an incentive to make software good enough to support their device/computer sales. Microsoft (arguably) has an incentive to make software good enough for manufacturers to license it. Apple and Microsoft, no matter how much people love to shit on them, actually have more straight forward, simple motives. They have an actual financial incentive to care about the quality of the product they deliver because you are paying them (directly or indirectly).

tl;dr Google only makes software good enough to draw you in to collect data. Other vendors are selling yous something and therefore have an interest in making that thing better.