I'm not sure this was true. The US might have expected to take such large numbers of casualties IF they insisted on invading very quickly for purely political reasons. But given a bit more time, there need not be so many casualties at all. Japan was literally starving. Everyone was on severely reduced food rations, including soldiers. Within a year or so, no one would have the strength to resist invasion anyway. In addition, the blockade destroyed Japan's ability to produce armaments, so the only way to resist invasion would have been wooden spears and hand to hand combat.
A man who's subsisted on 800 calories a day for the past 2 months won't put up much of a fight. Wait a few months more and he'll be dead, at which point he really won't put up much of a fight.
One of the most astonishing facts about the Pacific War was how few Japanese soldiers ever surrendered to the Allies (before the war officially ended). The Japanese sense of honor demanded that they fight till the end and never surrender. I no longer have the exact number, but IIRC, the total number of captives was less than a few thousands. Compare that with the number of German, Italian, Croat, Romanian, etc., prisoners taken.
This was so extreme that on Saipan, Japanese troops murdered ethnic Japanese civilians by forcing them to jump off cliffs to their deaths.
The Japanese were trying to negotiate a surrender even before the first atomic bomb fell.
One minority faction was. Bear in mind that, even after the first fission bomb fell on Hiroshima, they still didn't surrender. It took another bomb to force them to quit.
Also, even before Hiroshima, the Japanese has already trained millions of civilians to fight against the Allies. Many were expected to use nothing more than bamboo spears. BTW, as I recall, the Japanese government expected ten million Japanese civilians to die fighting the invasion. The US expected to take up to one million casualties.