Why do you think that a CTO has to be highly technical? Does a CTO at a big technology company write code? Line level engineering managers don't even write code a lot of the time. You just deal in the high-level abstract.
Their course corrections have been as good as any large company. Even if the product wasn't there, they caught many of the biggest trends. Even Microsoft didn't see the internet coming.