Why are antibiotics only prescribed for bacterial disease?
Antibiotics are designed to exploit the unique characteristics of bacterial cells so that they can kill or slow the growth of bacterial cells while leaving our human cells relatively untouched. So antibioitics target things like bacterial cell walls (which only bacteria make) or they target the protein machinery of bacteria (which is different than the protein-making machinery of human cells).
Antibiotics don't work against viruses or fungi because these infectious agents don't have the same properties as bacterial cells. For example, viruses don't have cell walls, and the cell walls that fungi have are entirely different than bacterial cell walls. So different classes of drugs must be used to target viruses and fungi; these drugs are called antivirals and antifungals, respectively.
It's important to note that antibiotics aren't only prescribed for bacterial disease. Some antibiotics have desirable side effects that are used to treat other diseases not caused by bacteria. For example, azithromycin is a commonly used antibiotic that has the beneficial side effect of being an anti-inflammatory drug. For this reason, azithromycin is used to treat some diseases associated with chronic inflammation.