These companies generate billions of dollars a year in profit. They, quite literally, have nothing better to do with their money than invest.
Interestingly, this is what will make these companies so entrenched for decades to come - anything that would ever come close to being a competitor..they will be part owners of.