There were two main reasons why the Mongols wanted to invade Japan.
First, the Mongols wanted to invade because they thought it might be necessary to do so. The Mongols wanted to defeat the Sung Dynasty. They knew that Japan was an ally and tributary of the Sung. They tried to make an alliance of their own with Japan, but Japan refused. This meant that the Mongols saw Japan as a possible impediment to their plan to conquer China. They felt that invading Japan would take away a source of support for the Sung.
Second, and perhaps more importantly, the Mongols wanted to invade Japan for the sake of their ambition. The Mongols wanted to rule as much area as they possibly could. In particular, they wanted to rule all of Asia. The idea that Japan could resist their rule was an affront to their self-image as conquerors and rulers of Asia. The Mongols wanted to invade Japan to consolidate their rule over the entire region and to make clear that they were the dominant force in Asia.
Thus, the Mongols wanted to invade Japan both for pragmatic reasons and for reasons having to do with their pride.