One of the main problems - among others - is that HR doesnt filter well for good engineers. Code interviews are often wrongly designed and additionally some people just sell themselves better by having a more dominant attitude. The result is often repos with spaghetti code done by careless, messy freaks.