'Market cap' is not the best choice of metrics here, it's really a measure of investor surpluses, ignore the rest of the equation.
Wallmart, Exxon, Amazon retail revenues completely dwarf the 'tech sector' - it's just that their margins are more narrow, in most cases, surpluses to consumers are vast.
Honestly 'profit to investors' should be one of the last metrics most of us care about. Most individuals should be far more concerned about surpluses they receive through lower prices or higher wages, as they'll nary get any real material lift via investment income.
In this way, it's kind of odd how 'market cap' is so widely used and perceived as some kind of great measure. It's good for investors, and unless you're an investor, it's bad for you. Every dollar that goes into the pocket of Amazon's investors should be a dollar in your pocket in the form of lower prices or better products/services.
Have a look at the biggest companies by revenue [1]
The only 'tech' companies on there are Apple and Amazon.
Amazon makes the hardware, and most of Amazon's revenue is retail goods.
There are not mostly software companies on that list.
Actually, a lot of HNer discussions tend to veer into this magical surplus world as well, I'd encourage anyone to have a look at 'big revenue companies' because it gives a much clearer picture of how the world works outside our bubble.
[1] https://en.wikipedia.org/wiki/List_of_largest_companies_by_r...