“This code seems needless, but surely it’s here for a reason
“This code seems needless, but surely it’s here for a reason. We better not touch it”.
Once code is merged, it’s hard to find unnecessary complexity, and risky to remove it.
So, look for unnecessary complexity early. Hunt it down in design, pair programming, and code reviews.
A related principle:
“Do not remove a fence until you know why it was put up in the first place.” - G.K. Chesterton
So before we remove code, we need to understand why it was written in the first place.