With great power competition comes great weapon proliferation. Japan is also oddly in competition with Korea, so to keep up with each other in the region then that's where they need to go.
Also Japan and Korea are looking at their geostrategic location. If China shuts down the South China sea, and Russia is an unreliable partner for the arctic route, then Japan and Korea need to be able to go around the first island chain and take the deep sea route to ensure their energy and resources still make it from Europe/Middle East etc...
Which means they need very long range, very long endurance submarines.