Why does the US government oppose Japan and South Korea getting nuclear weapons?
The immediate rationale is that as allies of the United States, these countries enjoy extended nuclear deterrence, which means the United States would use its own nuclear arsenal to protect them if necessary. More fundamentally, the US government has a strong ideological bent toward opposing new countries (even allies) going nuclear. This is not surprising considering the United States was the first country to deploy nuclear weapons. The ideal is you have them and nobody else does, or at least as few others as possible.