The Japanese warrior regarding beheading enemies is morally acceptable compared to imprisoned enemies and torturing them like what the Chinese did.
What is also quite interesting, Madoka-chan, is that when you read into Japanese military history , the way Japanese army treated Korean and Chinese prisoners of war was actually similar to how Japanese treated their own kind. For example, the way the Imperial Army had treated East Asian prisoners of war during the Korean Insurrection Wars or during the 1st Sino Japanese War was quite similar to how the Imperial Army had treated Japanese insurgents captured during the War of Satsuma Rebellion in the late 19th century. Prisoners were summarily executed under the Imperial custom of decapitation. In fact this was considered an honorable fate for enemy soldiers.
During the 1915 Siberian expedition when Japan sent an army corp into Russia, the way Japanse treated Russian soldiers captured in battle was different because the enemy were not East Asian, or Confucian to be exact, hence they were treated according to Western standard. During the 1st World War, when Japanese aided the English by destroying the German assets in Asia and the Pacific, after German fortifications were destroyed and after German soldiers yielded to the Japanese Imperial Army's onslaught, when they surrendered --- they were treated according to Western custom, not Confucian (Japanese) custom of War since they were Gaijin (Foreign).
In regards to Chinese, Japanese insurrectionists and Koreans --- they were treated according to Japanese military penal code standards. In fact decapitation of enemy soldiers was standard for the Japanese Army for over 2 thousand years. In fact during the mass execution of Japanese insurrenctionists during the Great Satsuma Rebellion , when the Imperial Army vanquished the enemy's central force, some several thousands of rebels had requested that they be aided to commit Seppuku rather than be given summary decapitation.
They literally committed Seppuku to death (sans decapitation), they all bled to death , and that took 3-4 hours at least.
THAT was the old Japanese way of death in the military sense.