There were a few factors that made this a legitimate concern. Food was becoming increasingly scarce throughout 1945, with the average Japanese citizen getting only around 70% of their recommended caloric intake and that number seemed likely to continue dropping. By that point the government was completely controlling the food supply through rationing. That system involved confiscation and redistribution, with military personnel given priority, followed by industrial laborers, and then everyone else. That unequal distribution fostered a massive black market, which often extorted poor and displaced individuals by gouging prices many times over. This bad situation was compounded by the massive exodus of people fleeing cities to escape Allied bombing campaigns. These people often lost their jobs, thus reducing not only their income, but also the size of the ration they were allotted. Many of these people turned to less honest means to get by, with some resorting to simple thievery while others deceived the government by collecting rations for dead family members or for jobs which didn't actually exist anymore. As one can imagine, the Japanese bureaucracy was under a tremendous amount of strain in 1945, so tracking and policing food distribution was extremely difficult. As the middle of the year rolled on, it looked increasingly likely that these poor, displaced, and starving citizens would be part a last ditch effort to prevent the Allies from conquering Japan itself. The military leadership understood the risk that came with that, as giving these people access to weapons, no matter how crude, created the dangerous possibility of banditry or worse. Given that the military was in control of the food supply and was known for its abuses and hoarding, there was a real chance that they would be the primary target of any uprising, which would likely create a domino effect of chaos throughout the country. While there wasn't any existing political undercurrent to this situation, the Japanese were aware that the Soviets were unlikely to remain neutral for long and unrest among the displaced and starving masses seemed like it could easily spiral into a communist revolution, one that would almost certainly purge the existing military leadership and the Emperor himself. One can infer from all this why the Japanese were willing to gamble that surrendering to the Americans might be the most favorable option.