Doctors are busy. They don't have time to read each and every journal article on the latest and greatest treatments. Sales reps can come in and highlight the key differentiators for their drugs (the FDA also makes them call out the negatives).
Sales reps also help with a lot of the non-sales aspects as well (getting reimbursement for the doc, helping patients who can't afford the drug).
You are correct that if you have the best drug out there by far sales reps don't really drive that much in sales. However, it's tough to convince marketing that they don't need sales reps at all, so even for the best drug they hire them.