The lawsuit was originally submitted in 2012 in an effort to open iOS app purchases to third-party sites and stores, potentially lowering prices. A court initially ruled in favor of Apple, which argued that customers were buying apps from developers and that the 30 percent was just the cost of getting space in its digital store. An appeals court revived the case in January 2017, however, arguing that users are buying directly from Apple and that developers don't have their own stores.
It's not surprising that Apple would bring its effort to the highest court in the land. The App Store is a key part of its business model, and not just because of the revenue the company gets (which is relatively small next to hardware sales). It touts the App Store as key to its combination of simplicity and security -- you don't have to wonder where to get an app, or whether a title from a third-party store is safe to use. While requiring Apple to allow third-party stores would allow more choice and flexibility, it'd also deprive Apple of key marketing advantages and might expose some users to new security risks.