I think it's grammatically more accurate to say,"The market was closed after a virus had been found." However, it sounds "better" to say,"The market was closed after a virus was found." Grammatically, can there be any justification for the second version?
An answer in this site says (inter alia)
Was closed and was found are expressing the certain past: they describe events we know happened. The order in which those events happened is signified by the use of after, and the sentence can be re-ordered without difficulty:
The past perfect does indicate an event further back in time, but that is already denoted by the use of after:
Not using after allows the verb to indicate the order of events. For example, we can use because. Even though because indicates causality, it doesn't make the timeline as explicit as using after, and the past perfect works.
English tends to avoid redundancy, at least in everything except the most formal legal language. The use of the "simple past" with an adverb like after is perfectly sufficient for specifying the order of events, and attempting to do so with the verb forms as well is not necessary.
'The shp was closed at 5 pm' can mean either At 5 pm the shopkeeper took the 'Open' sign down or At 5 pm, we found it closed because the shopkeeper had taken the sign down at 4 pm. Whether you use had been or was in your example depends on which you intend to convey (though presumably both would actually be true).
I don’t know where you are getting this notion that the past perfect is somehow “grammatically more accurate” here. It isn’t. In fact, it nearly sounds ungrammatical. That’s because the clause following after is already placed before the earlier one; nothing need be made perfect. Only the first of these two sounds right:
You are being confused by the was closed/found. If you used a normal verb that doesn’t require auxiliaries, the correct answer becomes clear. No past perfect construct is required, and indeed, it sounds wrong here:
Using that as a guideline, we see why your past perfect use is wrong.
In all the example-pairs above, the first of the pair is the correct one, and the second is questionable to the point of being incorrect.