Because the Japanese were forced to include in their post-WW2 constitution that they would no longer have a military for any purpose other than self-defense. As a result, the American taxpayer pays for the US military to be stationed in Japan for the purpose of offensive attacks against threats like North Korea, Russia, and China, thus indirectly also funding Japan's self-defense. This means Japan's self-defense expenses also drop, not to mention any offensive attacks (as long as the US agrees with them, which it probably would) come free of charge to the Japanese.