I'd argue that they tend not to lose on their home turf, but rather the ground moves under them. Google only increased it's hold in the web as Facebook took the new territory of social media.
Likewise Microsoft still is a massive player in enterprise software even as AWS became a virtual synonym for cloud computing.
An interesting thing I have noticed is that Amazon has made staggeringly little progress at user facing SaaS -- think salesforce.com. I went to an AWS conference years ago and the gap between the speaker's enthusiasm for zocalo and the crowd that couldn't care less (e.g. The crowd that was pumped for IAM and T2 instances) was striking.
Likewise Microsoft still is a massive player in enterprise software even as AWS became a virtual synonym for cloud computing.