$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.
$15B is two aircraft carriers. In less time to build one.
Arguably that was due to the success of iOS. I don't think it's ridiculous to suggest that the app ecosystem contributed to that.
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.