Recently, the Japanese defence minister, admitted that Dokdo is Korean territory by stating that Japan should "refrain from commenting on other countries' internal affairs."
So basically, Japan is interfering with Korea's internal affairs. And this statement implies that "A Korean president visiting Dokdo is just because the president is visiting an island belonging to his country. Therefore, Japan should remain quiet."
Japanese rightists, and Japanese with anti-Korean sentiments maintain the South Korea-controlled islets in the East Sea are an inherent part of its territory, both on historical grounds and in accordance with international law. However, not all Japanese believe this claim is true. Many, like minister Morimoto, believes that Dokdo is Korean territory.
The Japanese historians, especially, are claiming that Dokdo is Korean territory on historical grounds, and in the conscience of a scholar. So the only rational reason behind the territory disupte is Japan is trying to steal the island to gain benefits from fishing rights, and extension of its maritime territory. Japan might be thinking that through territory dispute they have nothing to lose, except for the deterioration of Kor-Jap relationship and take the risk for the slightest chance of stealing the island.