It's not. If the market cap goes up, it's because the price of bitcoin goes up. If the price of bitcoin goes up, the mining reward goes up. If the mining reward goes up, the block reward that incentivizes mining goes up. The mining market is in equilibrium when miners expenses approach the block reward, so mining uses more energy as the market cap goes up.