I know this is a very broad question, considering the different eras involved, but I am having a hard time finding an answer to it so turned to reddit. Wikipedia (great source, I know) seems to draw mostly from Bushido—the Soul of Japan, which I’ve heard is heavily romanticized. If anyone who knows about the subject could help, it would be much appreciated
Not to discourage other answers but /u/bigbluepanda and /u/ParallelPain discuss Bushido in these answers from the FAQ
https://www.reddit.com/r/AskHistorians/comments/4rte1l/were_samurai_generally_honorable/d54202b/