Per https://developer.apple.com/app-store/review/guidelines/
Section 11. Purchasing and currencies:
11.8 Apps that use IAP to purchase access to built-in capabilities provided by iOS, watchOS, and tvOS, such as the camera or the gyroscope, or Apple-branded peripherals, such as Apple Pencil or Apple Keyboard, will be rejected
As you may know, YouTube recently launched their "YouTube Red" subscription, which is available as an In-App purchase for $12.99/mo which includes the feature of "Backgound play. Keep your videos playing while using other apps or with your screen off."
Background audio (and now video with iPads and PIP) is a "built-in capability provided by iOS" so I'm having difficulty understanding why YouTube is allowed to do it.