The fact that a company backing an AGPL-licensed work goes under isn't the direct concern of the license. The fact that the code itself remains as Free Software, with a source-release obligation, even when run as an online service, is the principle concern.
Copyleft free software licenses, as with the GPL and AGPL, promote the concept and system of free software, first and foremost.
Under the AGPL, the source-disclosure provision persists.
In both cases, Amazon is doing software development, but in the first, they're not contributing back to the codebase. In the second, they are.
Amazon are maintaining the software. Along with other users.
Note that AGPL applies to few projects at this point. Amazon is very heavily reliant on, e.g., Linux and Xen, both of which are GPL v2.
The original thesis would be that brand loyalty would be strong enough to prevent forking like this. "You don't want that third-rate version, get the real thing from the original authors!". It appears that the customer base assumes quality is roughly equal considering its mostly the same code.
It's not possible to say the code is non-free because it's explicitly free, but packaging and placement (such as e.g. default pip installs using a trademarked name) could ensure at least some pain is felt to make a typical client talk to a server that does not have that file. Perhaps the file's license allows to be embedded anywhere so long as it is only used to play the role of a client
Open source is a good business strategy when you're trying to achieve vendor lock-in via price-dumping, a la what Google did with Android (and has been fined for in the EU).