I think the grammar not as complicated as you think if you know that 〜である方がいい means "It's better that [something affirmative goes here]". Similarly, 〜ない方がいい is "It's better that [something negative goes here]".
For example, consider an example where you are suggesting that your friends watch a TV program or not watch it. The literal translation of あの番組は見た方がいい would be "it's better to watch the TV program" and あの番組は見ない方がいい would be "it's better not to watch the TV program".
I think the context and logic is bit difficult to understand. So, I searched a little bit and they say "leaving air-conditioner on" consumes less electricity and costs less the electricity price in case just for 30 minutes between 9:00 and 18:00.
According to the article by Daikin Industries, Ltd., one of the largest air-conditioner manufacturers, they collected the opinion from consumers and 70% of them believe the case of "leaving the air conditioner on" costs less electricity price than the case of "frequently turning on and off".
They did experiment to verify that
実験(1): 「つけっぱなし」の方が消費電力が小さくなる
9:00~23:00まで「つけっぱなし」にしたエアコンと、30分間隔で運転ON/OFFを繰り返したエアコンの消費電力量を比較し、「つけっぱなし」の方が安くなる時間帯を検証。
結果
日中9:00~18:00の時間帯は、30分間であればエアコンを切るより「つけっぱなし」にする方が消費電力量は少なくなりました。
That is to say, if you are going outside for just 30 minutes, "leaving the air conditioner on" costs less the price than "turning it off when you leave and turning it on again after coming back".
The graph below shows the relationship between electricity price (vertical axis) and time (horizontal axis). つけっぱなし: "leaving the air conditioner on" and こまめに入り切り: "Frequently turning it on and off".

All in all, regarding electricity price, in the midst of hottest summer, keeping the room cool is better than turning off air-conditioner and let the warm air pass through the room just because you want to let the virus/dusts/micro-particles/etc. out from the room.
There are some other intersting graphs regarding electricity consumption and room temperature and humidity in the same article: 日中30分の外出ならエアコンは切るより「つけっぱなし」がお得でした!