>>13946891Interesting question OP.
Bacteria are divided into two main classes. Gram positive and Gram negative. These classes differ in their cellular barriers, as well as their internal processing of gene expression. We can make antibiotic drugs that are effective against (essentially) all gram+ and all gram-, and some which are effective against both.
Briefly, there is a third kind of bacteria called Mycobacterium. These have much more complex cell barriers which make drug delivery hard. These are the bacteria responsible for TB.
Viruses on the other hand have many, many different classes, and many many different mechanisms by which they deliver genetic information, the form of that genetic information, they transport it in different ways etc. etc.
For a COVID example, the current drug candidates are designed to target the MPro Protease in the coronavirus. This protease is produced by COVID using our own cellular machinery, and it itself is a machine which processes the other 'unrefined' cellular machines that COVID makes us produce. These other machines, when refined, form the surface proteins, help will assembly of virion particles, and are essential for functioning of the virus. By designing a drug which stops this machine, we halt the replication of the virus. The clinical data will confirm if this hypothesis is correct.
I hope that example shows you that given how many viruses there are, and how specific antivirals are, its difficult for a doctor to prescribe a certain antiviral, even if they know you have a viral infection. By the time the relevant tests are done and come back, you'd probably be feeling better anyway.
I'll monitor this thread over the next day or so if you have any follow up questions.