When a samurai received a new katana, the sharpness of the sword could be tested by attacking a random civilian or (after that was banned) by slicing a criminal or corpse.
Katana blades are notoriously sharp thanks to an extensive process of metal layering, folding, and targeted heating and quenching. Once the katana was made, its sharpness and effectiveness as a weapon had to be tested.
The Sengoku period in Japan was a time of civil war. Various feudal lords, called daimyo, fought to consolidate and increase their control over the country, and samurai were their chief weapons in this struggle. During this chaotic and lawless time, one way for a samurai to test a new sword was called “tsujigiri,” crossroads killing.
Essentially, the samurai would wait at a crossroads at night for some poor random person to turn up, and then the samurai would attack. Now, samurai had the right to attack people of lower class who had offended them (kiri-sute gomen), but that had a strict set of requirements: their attack had to come immediately after the insult, the other party were allowed to defend themselves, you couldn’t attack doctors or midwives, and you had to report your attack afterwards to ensure that it was justified. The crossroads killings had no such patina of legal protection.
Tsujigiri was banned as soon as central government re-established control over the country. In the Edo period that followed, some katanas were tested on dead bodies or convicted criminals instead. Katanas tested in this way had an inscription on them describing the number and type of cuts (ankle cuts, hip cuts, decapitations, cuts across multiple bodies at once, etc.). This so-called “cutting signature” greatly increased the value of the blade.
[Thanks to David S. for suggesting this topic.]