I don't agree with this theory, that in the past they did not have antibacterial and therefore they drunk all beer sours.
For what I know gruit did act as an antibacterial agent, but it cannot impart the bittering that hop imparts. The "antiillness" properties (bacteria were unknown) of certain aromatic herbs were known since the middle ages. Balms were prepared with vinegar and herbs like rosemary, sage, thyme, dill, basil, and certainly many others, for all sorts of illnesses and the same herbs were used as preservatives in food.
That mixture of herbs protected the beer from infection, but not as long as hop did. A beer with gruit would last many days without problems, but not the many weeks that allowed beers to be exported from Germany to Britain. Incidentally, one can easily guess they were also used for cured meat and in cheeses for exactly the same reason.
We shouldn't be too hasty in concluding that our ancestors eat and drink spoiled food, I believe they did not. We lost their "technology" and we jump to wrong conclusions. They could bake bread that would last weeks and was still eatable (various references in literature, most famous in Italy the "pane del perdono" in The Betrothred). They did not eat molded bread for sure!
I don't think they drunk sour beer unless they wanted to, rather they drunk beer which tasted sage and rosemary in a way that we would find strange (imagine some Fernet or Amaro diluted inside your beer, and some sugar in it, or some coke with some beer inside).
After the discoveries of the Americas and of the Far East, spices from Asia such as pepper, coriander, cloves, nutmeg, angelica etc. were also certainly used in beer as preservatives and they arrived to us in "Trappist" beers where they were maintained after the introduction of hopping.
As we know, in Shakespearian Britain both "beers" (coming from Germany, hopped) and "ales" (locally produced and not hopeed) were available. I don't think any description can be found that says that ales were sours, although we know that ales were much sweeter than beers, so much so that beers had a "shocking" taste for the first consumers, they were distinctly different, a bit like Chinese or Japanese cuisine are very unconventional and different for our palates. If ales had been sour and beers bitter, we would find descriptions saying that beers coming from Germany is strangely not sour, but I never read that. References to ale and beer in literature of all sorts (both artistic and technical) of the time is certainly very abundant.
Also, ales were more expensive even though they were local (and one must imagine the amount of tariffs and the transport costs of the times were quite substantial!), which points me to a certain degree of ale wastage, or more difficulties in reaching scale economies that were possible with hopped beer, which again confirms that people don't drink sour ale unless they want a sour ale. All this IMHO, that is.