It's the classic Japanese fig leaf. Technically they don't have aircraft carriers either, they have "helicopter destroyers" that look exactly like aircraft carriers, complete with a runway and naval jets.
But there is still a lot of opposition to both nuclear weapons and having a military that isn't purely defensive. Aside from the history of the military causing huge disasters for Japan, people see that other countries tend to get swept up in US military adventures, and don't want that.
The conservatives talk a lot about needing a stronger posture with North Korea and China nearby, but I think really what they want is a lucrative weapons industry. Japan has the technology and industrial base, but for political reasons companies there don't get involved in offensive weapons.