Netflix, Amazon Prime, Kindle, Spotify, etc., are all in a special category called "Reader" apps, which was established about eight years ago after Kindle became an issue since Amazon was selling e-books for it.
Originally, Apple said it wanted a 30% cut of Amazon's Kindle books as well if they were being bought through the app, but when the dust settled, Amazon agreed to remove all purchasing capabilities from the Kindle app — even web links had to go, and Apple decided that was acceptable.
The rule has been the same ever since. Basically, if you're a media subscription service, whether it's for books, music, or movies, you can avoid the whole IAP thing provided you don't provide iOS users with any links to actually go and sign up elsewhere. However, if you offer purchasing capabilities in your iOS app, you need to use Apple's payment system, and pay Apple it's 30% cut (for the first year — it goes down for subscribers that you retain after that first year, as long as they continue subscribing through Apple's IAP system).
Once upon a time, both Netflix and Spotify allowed IAPs in their respective apps, giving 30% to Apple for those subscribers. Eventually they decided they didn't want to do that (and of course, being Netflix and Spotify, they didn't really need to), and pulled out the IAPs, letting customers figure out that they could simply subscribe online — even through the Safari browser on their iPhone. Others, like Rdio back in the day, and YouTube today, keep IAPs in, but simply mark up the transactions by around 30%. For example, YouTube Premium is $12/month on Youtube.com, but $16/month if you buy it through the YouTube app. Contrary to popular belief, Apple does allow this (years ago, there was a policy that prices had to be the same, but that hasn't been the case since around 2011).
The only more recent development is that a few online streaming services, of which Amazon Prime is the most notable, have signed a special deal with Apple to allow them to sell digital content like movies and TV shows through their own payment systems rather than using Apple's IAP, subject to certain conditions, and in exchange for promising to fully embrace all of Apple's features, such as Apple TV, Siri, AirPlay 2, and Apple's TV app. Even then, there appear to be a few catches... for example, with Amazon's arrangement, purchases go through Amazon only for those users who already have an Amazon account with a credit card on file, otherwise they're processed by Apple, which still takes the normal 30%; users aren't given an opportunity to sign up for an Amazon account or add an Amazon payment method in the app.