Literacy is not a binary. It was apparently common for working class people to have some practical literacy; the ability to recognize and write words in their local vernacular that were relevant to their lives and professions. A little bit of literacy goes a long way to facilitate trade and commerce, even if you're not comfortable reading a whole book. In fact there are still some people who go through life like this in developed countries today.