Why didn't Hideyoshi go through Taiwan?

Much, much too far. It's a voyage across open ocean to Taiwan. The Japanese could just about cross the strait of Tsushima, but transporting that many men and supplies to Taiwan is a recipe for disaster.

true, as far as i remember, toyotomi have roughly 300.000 army to feed, it will be very difficult to transport and supply army in more far away base like taiwan island, korean peninsula are the only one good option for hideyoshi, there is no other way.
Korea is a stepping stone on the way to Peking. Japanese Pirates were so active off the coast of China that the Chinese banned all trade with Japan. This cut off Silk and other consumer goods. The Portuguese came along and became a middleman between the two countries. One other benefit of the Korean route to Peking was the Chinese would have a hard time hitting the Japanese Invaders in the Flank. The Western side of Korea is easier to travel through.

true, korean peninsula literally like a knife in the throat for japan.