MongoDB found that objectionable, and changed the license such that Amazon would either have to pay, or stop using it.
Amazon stopped using it, and started using its own in-house implementation instead (presumably because it was cheaper to develop it than to pay MongoDB).
So, MongoDB got exactly what they asked for. It's just that, when they forced Amazon to make a choice, they didn't expect one of the options they gave them to be viable. They were wrong.
I don't see how Amazon is in the wrong here. They are no longer using MongoDB for free, as the authors demanded. They did not reuse any code. They are not advertising their replacement as MongoDB, either.
Is it because of API compatibility? But the notion that one cannot reimplement a public API for the sake of compatibility is in and of itself extremely hostile to the F/OSS ecosystem, given how many products in it are reimplementations of proprietary APIs.