I have seen bad code in my life. Some cases developers don't care about the code ethics OR they are not intelligent/experienced enough to write a good code.
But in many cases its the mistake of product managers or leads. When the product goals/specs are not clear, the design changes very often and you have to meet the tight deadlines. This leads to redundant and inefficient code which is very difficult to clean up and maintain.
But in many cases its the mistake of product managers or leads. When the product goals/specs are not clear, the design changes very often and you have to meet the tight deadlines. This leads to redundant and inefficient code which is very difficult to clean up and maintain.