I don't think your initial hypothesis (viral v. bacterial) is right.
I think any infection can cause a flare-up. Urinary tract infections, for example, are almost always bacterial, but cause symptom flare-ups for lots of people here.
For some reason, respiratory infections (along with UTIs) seem particularly likely to exacerbate symptoms.
But it might be down to something as simple as whether you have a temperature or not.
If the ear infection wasn't accompanied by fever, but the cough was, that could explain the difference.
Actually, as you've had both recently, are you sure the cough and ear infection aren't related?