A) You work for a US company, earn money from the US company, pay income taxes in the US, live and spend money (and thus sales taxes) in the US
B) You work for a US company, earn money from the US company, pay income taxes in the US, but live and spend money (and thus sales taxes) in Japan
Clearly (B) is better for Japan economically? I think these laws are mostly enforced out of inertia and not any rational reason.