You need a doctor to prescribe antibiotics because they know which antibiotics are best to treat particular conditions. There is no point taking the wrong antibiotic - it won't work, and the infection could get worse, and you will be helping antibiotic resistance to grow.
Doctors are better placed - due to all that training - to tell whether younhave a viral infection or a bacterial one. None of the people who are pro over-the-counter antibiotics have been able to tell me how they can tell what is a viral infection and what is a bacterial one. If you have a viral infection, there is no point whatsoever taking antibiotics - none.
Even hindsight isn't a good judge of whether an infection was bacterial or not. If you have an infection, take antibiotics, and get better, that doesn't mean it definitely was bacterial. It could just as well be that you had a viral infection, that your body's own defences fought off, and the antibiotics did not help at all.
But the big, unanswered question is this - how are we to cope with the growth of antibiotic-resistant bacteria? If it goes on growing, we could well end up with people dying of what used to be easily treatable infections - and then it will be too late. As a previous poster has said, there have already been deaths, due to antibiotic resistant infections.