In this book, Varoufakis, which was Greece Finance Ministry at the time, explains how he was tasked to negotiate with EU institutions and IMF to alleviate Greece debts. While he proposes restructuring plans after restructuring plans, nobody even try to argue with him on the plans. They all say that there should be a strong austerity, it is the way to go. At one point, he managed to get a glimpse of what is presented to him as a very complex economical model that he (phd in economy) could not understand and, by looking into the code, discover that it is utterly stupid: the whole agenda of austerity is based on the fallacy that you could raise taxes without affecting consumption.
You could say that my example is only saying that there are good and bad economists and that things go wrong when politicians listen to bad economists.
Well, it turns out that politicians only listen to bad economists (because that’s what they want to hear) which make any influential economist a bad one (because you can’t really make a career as a good one who say things like "give more money to the poor" or "tax the rich").
Varoufakis is an exception here but not so much: he was quickly removed from office once people understood that he would not agree to become a bad economists to stay in power.