It was usually performed by certain high ranking Japanese Officials and when they suffered a Major blunder in the war, or something that was considered MAJORLY unhonorable, and that's the key here, honor. Honor was HUGE in Japan, your family would consider you worthless if you didn't have honor, so doing something like losing a battle and surrendering were considered cowardly, so to maintain their honor and avoid capture they would commit Seppuku
Modern India is based on the Indus Valley Civilization.
Historical evidence suggests over six thousand years ago a massive wave of migration took place into the Indus Valley from Central Asia. Why such a huge population of people resettled from their homelands into the Indus Valley is not known, however, what is known is that they brought them various traditions, cultures and languages that completely changed the fate of the region for the coming years.
Alongside new language and culture, they bought in a religion that had a vast impact on the belief system of the local people.
Hence, it is clear that modern Hinduism actually grew from a mixture of local religious beliefs with those of Central Asian nomads who moved here.