You can not compare Si Valley salaries to anything, since they are irrelevant. The salary may be high, but so is the cost of living there, so it’s basically a wash. And Si Valley is not the center of the world, so comparisons to the relatively few people who live there are meaningless.
Who cares if it consumes 2 years working time if you die 10 years earlier than you would have. Also exercise gives you many health benefits, including cognitive function, so you will be more healthy and more productive when you actually are working.
Cost to go to the gym?! You can exercise at literally 0 cost. Do some push ups, go outside for a run, etc.
Your 10 years number is significantly overblown. First result in Google is:
> they found that those who did 75 minutes of moderate-intensity activity weekly lived 1.8 years longer, on average, compared with people who did no physical activity
If you believe that, it puts it into 1.25 (no exercise) vs 1.8 years, which still does not include any preparations.
Do you calculate all your other hobbies like this? You probably have "spent" millions playing video games
This, however, is not applicable to hobbies. Hobbies are what one tries to save time for. If for you gym is a hobby, you should not be doing the above calculation.
I got in the habit of doing this kind of calculation early in my career before realising it is a) pointless unless someone will actually pay you that money if you instead do work, and b) still not a healthy way to think anyway in many cases where a) is true, due to life's necessities.
It might be "cheaper" to pay a kid to mow the lawn but sometimes I find it relaxing.
Another way to look at it is in 40 years it will consume two entire years of working full-time.
And that does not include cost to go to gym like transportation time, change of clothes, etc