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.
It's called a collapsing bag defence, intended to hold out as long as possible. Contract too slowly, and some of your forces will be isolated and captured unnecessarily; too quickly and you have failed your objective. Urquhart performed it masterly at Arnhem, with the aid of his immovable wounded.
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.
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
The long-term discord between the Imperial Japanese Army and Imperial Japanese Navy was one of the most notorious examples of interservice rivalry. The situation, with its origin traced back to Meiji period, came with geo-political consequences leading to Japan's involvement in World War II. The IJA/IJN rivalry expressed itself in the early 1930s as the “strike north” and “strike south” factions. The strike north faction advocated the conquest of China a scenario in which the prime role would be taken by the Army, the strike south faction advocated the taking of Indonesia a scenario in which the Navy would predominate. In order to further their own faction relatively junior officers resorted to the assassinations of members of the rival faction and their supporters in government. Initially the strike north plan was deemed the more prudent course leading first to the occupation of Manchuria and then the fullscale invasion of China, however, a number of the powerful industrial Zaibatsus were convinced that their interests would be best served fulfilling the needs of the Navy and with their the support the Pacific War was initiated.
The IJA and IJN rivalry also saw both services developing air arms, the Army creating its own amphibious infantry units and running ships and submarines including submarine chasers, the Navy meanwhile would create its own paratroop force.
Other examples of this rivalry include, it is said, the Japanese Navy taking several weeks to inform the Army of the disastrous results of the Battle of Midway.
In his 1991 statement Shōwa Tennō dokuhakuroku (昭和天皇独白録), Emperor Shōwa (Hirohito) made a connection between the Army-Navy rivalry and the defeat of Japan.
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.