If I have a factory in Bangladesh print some t-shirts with the Nike logo on them, I wouldn’t be able to sell them (at least in the US) because I didn’t get permission from Nike, which owns the rights to their logo. It’s the same thing here. It doesn’t matter if the factory happens to also produce legitimate Nike t-shirts.
If you go buy a bunch of Nike shirts from a Nike store they cannot stop you from selling them on eBay or Amazon (at least legally). At best the shoe company could have sued their authorized retailers for the bulk sale if it violated a contract.
Amazon happily complied with an illegal request to restrain trade causing damages to a small company. The lawsuit would have been huge.
Even if the product were from an authorized retailer, I don't see how the shoe company's request to Amazon was illegal. Restraint of trade means that contracts restricting commerce are in some cases unenforceable. It doesn't mean that Amazon is compelled to do business with the reseller if they would rather prioritize their relationship with the shoe company.
Unfortunately, trademark law in most jurisdictions allows manufacturers to effectively prohibit importing and selling goods obtained cheaply overseas and reselling them in direct competition with ‘legitimate’ distributors.
This allows manufacturers to engage in price differentiation, to the detriment of consumers. As with most IP law it mainly serves to enrich those in a position to exploit it.
The kirtsaeng v Wiley supreme Court case affirmed the right of sellers to import international versions of textbooks for resale in the US. This resulted in a reversal of Omega watches v Costco where Omega had argued that Costco couldn't resell their watches in the US.
https://en.m.wikipedia.org/wiki/Kirtsaeng_v._John_Wiley_%26_....
However, the case doesn’t necessarily create a precedent. There was a four judge majority, with one judge concurring, but with a different opinion. Also, it was a copyright lawsuit, not a trademark lawsuit, so it doesn’t necessarily set a precedent for trademark disputes.