The App Store is in no way Apple’s primary source of revenue.
Apple also makes healthy margins on its hardware products.