A lot of what Google does, or fails at, makes a lot more sense when you actually think about what its core competencies are: big data, anything that works best with an exabyte of data, a billion CPU-years, and some crazy machine learning / good ol' fashion statistical elbow-grease.
It's obvious how this relates to their original business, Search, and how it relates to their more successful spin-offs and their failures. Spam filtering and self-driving cars are more big data problems (though spam filtering is less impressive nowadays), and the Cloud and YouTube make a lot more sense when you realize that Google already runs a really efficient data-center. Meanwhile, eg, Google Reader was something that didn't really need a Google to run, and suffered for it.
It's not as obvious to me how AWS grew out of Amazon; it doesn't seem obvious to me that you need that much data center to run Amazon (or at least, Amazon-at-that-time).