Antibiotics, such as rifaximin, are prescribed for IBS when bacterial overgrowth, like small intestinal bacterial overgrowth (SIBO), is suspected, particularly in IBS with diarrhea.