On the topic of eating raw fish and sashimi
Present day Japanese chefs are taught which sea foods are affected by which particular parasites during their apprenticeship. So they handle those accordingly. In ancient times Sushi wasn't made out of raw fish. The fish was cured and cooked before being consumed. Using Salmon for sushi is a new concept dating back around 30-40 years. Which is why Sushi was all that safe in ancient Japan.

You can find a consuming discussion on the same topic on Reddit. 
https://www.reddit.com/r/sushi/comments/2g5mhe/noob_question_how_did_the_japanese_of_old_not_get/