There are different types of "good code" and "bad code" .....
"Good Code for collaboration" is Code that is written in a way that everyone else can read it and understand it so it's easier to help each other. (syntax / semantic)
"Good Code functional" is Code that exactly does what it should with the minimum of resources available without affecting anything around it (good isolation / functionality)
"Good Code structural" is Code that has is written in a way that everyone can quickly find what he/she is looking for. (structure)
..... and so on.
that's quite easy and logical but .... they are partial exclusive, which means you sometimes only can have one or the other.
the most efficient - which you could call the most direct - way to write something is sometimes not the easiest to read. The most structured way could slow you down because you get a lot of dependencies you have to think about.
If you think of a house it's only 1 thing but if you think of all things inside the house seperatly you have to think about a lot of things at once if you change the house.
we trade things, "Bad Code" is Code that has none of the recommended features, without any reason .... that's basically it :) it misses the "Knowledge of WHY it is done that way, it's just done that way" ... that's at least my opinion.
I would go so far to call it "unloved Code" ... something the person who wrote it didn't care about.
We tend to be obsessed with "this is how good code looks" and we take away the context it is written in which means we take away the meaning. You rarelly see really bad code, most of the time we don't have the context to understand the meaning of why it's done in a certain way.