Even in August, Japan still kept garrisons in China totalling around 3 million men. They were second-line troops and poorly equipped, yes, but why did Japan not recall everyone to defend the home islands as the US invasion draws near?
I can think of a number of reasons, but they fall under two categories: 1) Logistics and 2) Morale
With the Japanese islands cut off from the outside world, the Japanese islands could not produce enough food to feed its population and the soldiers already on the islands. Pulling another 2-3 million troops from China would have only aggravated that problem. Whereas the soldiers in China could feed themselves and "smuggle" some food to the home islands past the naval blockade. Finally, as Pieter pointed out, holding China (and its food-producing areas) prevented the Allies from easily capturing them, and using the food and other supplies for the invasion (instead of bringing them thousands of miles from the United States).
With the Allied blockade, not all of the Japanese forces would have been successfully repatriated. Perhaps half of them might have been sunk by Allied ships. Having half the China army at the bottom of the sea would have probably done more damage to morale than the (shell-shocked) survivors would have contributed to the defense. And oddly enough, when a country is threatened with invasion, having an overseas "colony" may be a consolation; at least someone else is worse off than you are.
How many troop transports did the Japanese retain at that point in time? What success would they have had by then in protecting such a cargo from US submarines, surface vessels and air craft while it shuttled across?
The East China Sea is a far cry from the Straights of Dover after all, and that wasn't called The Miracle of Dunkirk for no reason. The North Sea was amazingly calm for three days, and the Germans were caught unprepared by having out-run their supplies again.
Also the economic and geographic resources that Japan continued to occupy in China would have simplified the US logistics for an invasion considerably.
In every battle there is a correct strength to devote to each objective, according to the plan adopted. Any serious criticism of the adopted plan would require detailed knowledge of, and analysis of, the Japanese intentions for defence of the home islands. Certainly US casualty estimates for the invasion do not recognize any major flaw.
Pieter Geerkens and Tom Au has made good points about the logistical and technical feasibility of moving so many soldiers back to Japan. I would also contend that the Imperial General Headquarters would not have wanted to do so either.
The first reason is: because Japan did not need them. The imminent invasion was Operation Olympic, scheduled for 1 November 1945. Now, suitable landing sites in the Home Islands were very limited. Both the Allied and Japanese High Commands isolated Southern Kyushu and Kanto's beaches as the primary viable invasion targets. Both decided that the first invasion would take place at Kyushu, and Japan proceeded to practically stake everything in that battle.
Accordingly Japan mounted a massive build up in Kyushu in preparation for the coming battle. A force of 14 divisions, five independent mixed brigades, and three armorued brigades was assembled in Kyushu by July, forming a force of some 900,000 strong. Allied planning had assumed there would be three divisions in Southern Kyushu by November. These forces were assembled from all over Japan, as well as Korea and Manchukuo (and the latter technically China anyway).
Given the size of existing forces, simply pulling more forces from China would be unhelpful. Rather than manpower issues, Japan's most pressing difficulty was resources and supplies needed on the ground. Which brings me to my second reason: because Japan lacked the resources to use them.
Between April and July, the transport system had, despite bottlenecks and inadequate transport or distributions systems, moved an impressive amount of resources into Kyushu. Yet the existing forces in Kyushu, while granted already huge, suffered from high shortages. The 40th Army, defending Southwest Kyushu, had only 30% of its rations and 40% of its ammunition. The 57th Army had five divisions and two tank brigades, but only the resources for three and a half divisions' operations.
That was despite scrapping the bottom of the barrel, and greatly straining fast deteriorating supply networks to move resources to those forces. Keep in mind that, due to Allied aerial superiority, Japan could not count on an operational rail system by the time of the projected invasion. Japan's solution was to stockpile resources in advance, and those resources were sharply limited.
Given that Japan had only a couple of sites to focus their defense on, and highly limited resources with which to do so, the utility of stationing three million more men within Japan would be dubious. Certainly not worth the price of abandoning vast, costly conquests in China.
Another issue was that the China War was run by the Japanese Army. The war against America was run by the Japanese Navy.
These two groups did not cooperate much if at all with each other during the war.
Source: Wikipedia on "Interservice Rivalries". Virtually any history of the development of the IJN will also give some information
It was also partially due to their fundamental beliefs about the war and their pride. They didn't just view taking China and other islands as "land grabbing". They genuinely wanted to create a unified East Asian dominion under the Japanese flag because they believed at their core that they were superior to everyone else around them and in the world. Even if they knew of invasion plans, they would never admit to the people of Japan (whom they routinely lied to) or their own soldiers that the U.S. was capable of actually invading them by withdrawing from China to help defend the homefront. That would lead to recognizing failure and an inadequacy to defend their land.
The Kwantung Army in Manchuria was largely made up from a Division of Indian soldiers who had defected from the British Army in Burma. They were considered unreliable soldiers by both sides.
Control of Manchuria ("Manchukuo") denied America the ability to forward base aircraft in China within easy striking range of the home islands, however that was just one consideration.
It also safeguarded sources of coal and iron-ore, protecting Korea ("Choesul") where a large ammonia nitrate factory at Hamhung ("Konan") produced two thirds of Japan's explosives requirements.
There was also a large Tachikawa aircraft factory at Shenyang ("Mukden") which still manufactures aircraft [Mig jet fighters] for modern China to this day. In January 1945 the Mukden Arsenal also began manufacturing V-2 rockets under the leadership of Dr Yamada who had returned from Germany, which were intended for the defence of China and the home islands. Indeed U-219 arrived at Djakarta from France in November 1944 carrying 12 dismantled V-2 rockets for Japan.
More controversially, the USN made Magic intercepts of signals between Berlin and Tokyo discussing Japan's requirement for shipments of uranium for a secret atomic bomb project based in Korea (Imperial 8th Army Laboratory). Irrespective of whether one agrees, or disagrees that Japan completed an atomic bomb, Allies were aware from July 1943 of such a project in Korea. If japan had an Atomic Bomb project in Korea it needed to protect that project and give it time for fruition.