Free Software licenses don't restrict profit making, even the AGPL wouldn't stop Amazon from using the same strategy to beat those OSS companies in the market.
Also, Amazon were already contributing code back when these companies changed their licenses, the companies don't care about code contributions, just money.