Rashi lived in the Dark Ages, when books, if they existed, had to be copied by hand, which, raised questions about authenticity and reliability.
There was more than enough of a tradition even at that time to make knowledge of Torah not only possible, but, expected.