It may be easier to come to grips with the question of anachronism with a concrete example. When the Angels come to Lot we are told that he served them matzos. Rashi comments (19:3): “Pesach haya” – it was the holiday of Pesach.
Rabbi Maroof commented on an earlier post – “Is it really rational to assume the Avot commemorated events that had not yet occurred? Most ritual mitsvot revolve around Yetsiat Mitsrayim which was centuries after their deaths.”
Fair point, but then what do we make of Rashi? Rashi seems to be addressing a simple textual question – why mention the seemingly insignificant detail of what bread was served. If you dismiss Rashi as “derash” and not pshat, what does that mean? – did Rashi waste his time composing “fictional” answers to explain troublesome details in the text? Or to put it another way, if Rashi knew it was irrational or improbable for Lot to have really kept Pesach and eaten matzah, then hasn’t Rashi failed to answer the textual question he posed?