Until scientific evidence showed how harmful it was
Things like alcohol and coffee are very difficult to study because of all the variables involved and the types of studies. I honestly doubt that coffee is really that beneficial, but there’s plenty of data to show it isn’t harmful.