It's well known that chronic stress weakens the immune system, and makes it easier for a bacterial infection to take hold.
So a more complete hypothesis is that stress can be the cause, whereas weakened immunity and consequent bacterial infection is the mechanism.
Of course, anything else that causes the immune system to be weakened can also be a cause.
As user interpenetrate has articulated in more depth, the error is in the need to identify a single, simple "cause".
Susceptibility to flu is influenced by immune system fortitude; that's uncontroversial. That stress is one factor (among several) that can weaken the immune system in an otherwise healthy person, is surely useful to consider when making life choices.
I notice in myself that I often get a sore throat after being stressed and not sleeping enough.
It wasn't until 1982 that the bacterial cause was found, and it took years for the medical community to abandon the "caused by stress" explanation and apply real treatment.
partly explained here: https://en.wikipedia.org/wiki/Helicobacter_pylori