I hate those lazy introducer of Japanese culture hudreds years ago... Seppuku / Harakiri was just one of kinds of execution by himself.
A samurai, as a born law enforcer caste, must show his qualification by any chance possible, that he treats people so fair that he could execute any illegality including himself. It was something like the sword of Damokles, only the sword happened to fall.
The ethic was reinforced by law system. If he refused the execution and ran away, law said the house (under strong influence by Coufucianism, the value of accumulated legacy from ancesters was higher than we think) was to be ruined.
Much later in early 20 century, fanatic military guys were so anachronistic and reminiscense that harakiri was a very good tool to dicipline soldiers to be a fierce death commandoes. Now harakiri became something between ritual suicide and a toxic pill embedded in spy's tooth.