Every Android application comes with file called manifest. It specifies many things, but in the context of this debate also permissions and device capabilities required. If your app requires gyro, accelerometer, high-dpi display, OpenGL ES 2.0, specific texture formats or whatever, you put it here.
And here comes Google relationship with device manufacturers. As you certainly know, Market is not a part of the open-source android release, but proprietary app, that has to be licensed, if you want to distribute it on any device. So when the manufacturer licenses the app for the specific device, it also provides Google with device capabilities. Google puts it into the market, so they can show you only those apps, that your device is capable of running.
Amazon, of course, does not have such a database, and also does not have relationship with device manufacturers. It is up to them to find a way to build similar filtering mechanism. Nobody said, that building competing market is easy and that reviewing apps is enough. Good luck trying, though.