this already exists.
Developers are supposed to test the apps with prier versions and if it doesn't work, they list what version it works with and you can only download it if you have that version or above.
The problem is that not all developers are big money companies, the majority of them are just normal people , people doing it as a hobby or just for the fun of it. Then you have the people that have no money and are just trying to slap together an app to try and start making a few bucks. These people do not have the funding to purchase every single product that apple sells just to test and make sure each version of their app works on every device. Instead they test the app with the emulator that apple provides. You pic the device you want to emulate and run the app to see if there are any problems. Most of the time this is accurate however if they are doing something complex it may work on the emulator but have an issue on an actual device.
iOS is actually WAY better when it comes to apps working across devices because there are limited numbers of devices and they all run pretty much the same OS's just tweaked a little. Android on the other hand is hit or miss if an app will work on a given device because there are so many and manufacturers like to change the android OS.