You don't need to be in your country at the time of applying. However, you need to depart from your home country for the (even connecting)flight that uses the visa.
As verified by checking your boarding pass and your passport stamps.
I don't understand the reason for the rule, but they enforce it strictly.
because Thailand is importing these goods. Virtually no domestic production of gas&coal. That's why elevated world market price increases hit Thailand also. Also the government used to subsidize the electricity rates for a long time. But they ran out of spending money recently, that's why a combination of full-rates plus inflated production cost led to the strong jump in just 1 month.
it must be nice to live in your own oblivious world. However, factual data shows 85% of Thailand's electricity are generated by gas and coal, the very commodities that have risen massively in recent months.