Viruses can crap out the immune system thereby enabling opportunistic bacteria to multiply causing a secondary bacterial infection in the respiratory tract. These secondary infections can cause bacterial pneumonia quickly when the immune system is already compromised fighting off a viral infection. Antibiotics prevent this from occurring.
They dont prevent it from occurring. They just ensure it will be a resistant infection when you get it.