Look how much 20+ billion revenue is compared to other companies. The iOS division of apple could be one of the largest companies in the world on its own.
$15B for devs since the ecosystem was created (with most of the growth recent) does not compare to the lifetime value investors place on the entire company.
$15B is two aircraft carriers. In less time to build one.
It's not a complete comparison, just comparing the impacts of deca-billion capital expenditures.
But you're right they're completely different in a lot of ways. Apple "builds" more than one aircraft carrier a year (in total cap ex spending), the US Government takes ~10 years to spend the same money to build one.