Because you're paying US income taxes while consuming next to no US government services or infrastructure.
> But in scenario (B) you're spending money in Japan
Anyone who lives and works in Japan spends money in Japan. What's great about that? Most of those people also pay taxes.
> basically you're directly injecting US money (your US salary) into the Japanese economy
Japan might say: if this US company doesn't mind someone working from Japan and paying them an American salary, why not a person who already lives there and pays taxes there? That's obviously better than someone new who doesn't pay taxes there.