There's an excellent answer to this question in this older thread:
https://www.reddit.com/r/AskHistorians/comments/27vf5f/literacy_rates_in_premodern_japan_why_was/