Free Software was designed to avoid this, and has become stricter as the technology changed. Open Source was deliberately designed to thwart this. The entire intention of it was to allow businesses to resell work that was done for free. When you fork Free Software, your fork is also Free Software.
Also, Amazon were already contributing code back when these companies changed their licenses, the companies don't care about code contributions, just money.