So hardware sales don’t cover the cost of running the App Store at all?
Well? Let's do some math.
50 mil registered apple developers (hardware not required to register btw). Let's assume 40% actually have some sort of Apple hardware.
20 mil registered devs with apple hardware. Of this 20 mil, how many didn't have Apple hardware and bought it for the sole purpose of developing for it? 25% I think is generous (if you disagree, let me know) so let's use that.
That's 5 million developers. App Store launched 17 years ago. That's about an extra 300k devices sold per year because of the developer program. That's maybe $400 million *revenue* per year. Of that revenue, maybe $3-$4 million goes towards App Store at best.
App Store costs Apple about a few billion per year to run.
Hardware sales don't cover the cost of running the App Store.