Why in some cases condition is used with an article and in some cases with no article? For example:
Considering its age, this house is in excellent condition.
He was in a terrible condition and had drunk far too much whiskey.
Strictly speaking the indefinite article could be present or absent in both the specified examples. But idiomatically we're more likely to include the article in the second case.
This is because explicitly specifying in a condition more strongly implies that there are other conditions - which could have applied, but don't (in the specific case mentioned).
Something like the state of repair of a house is a relatively static "condition", so it would often be reasonable to completely ignore alternative conditions. But the state of being inebriated after drinking too much is relatively transient, so including the article there more explicitly singles out that state from the condition he was in before he started drinking, and after he sobered up.
Also note that in contexts like He is in condition, it's idiomatically established that we mean fit, healthy state/condition. We wouldn't normally say He is in a condition, because the idiomatic standard there is He is in a state - where it's assumed we mean He is in a bad, confused state/condition.
We always include the article with state in such constructions, but it's optional with condition.