Antibiotics work against bacteria
Antiviral drugs against viruses.
Anthelminthic against parasites
Anti metabolites against cancer
Different pathogens and states different classes of drugs...
it is waste to give antibiotic for virus.
When a person is affected by virus ,he/she will become weak,so the body can be easily affected by any other secondary infections.To prevent the secondary infections ,antibiotics is given.