The benefit is probably from the removal of fat, not a direct antibacterial/antiviral effect. Fat plays a complex immunoregulatory role in human physiology: it down-regulates some pathways, while up-regulating others (notoriously, the production of IL6 is carried out, in part, by adipocytes). The overall effect of fat on the immune system, however, is negative: it tends to increase the chances of rheumatological disorders, cancers, and many other diseases. Alternatively, the effect may be due to some sociological factor that their analysis failed to account for.
Nobody's denying this, but the interesting story about GLP-1s is that after you control for fat loss (for instance, by taking cohorts of patients that aren't losing weight) you still get evidence of these off-target effects.
(I am not a medical doctor)