In a lot of cases, I see variations of this when there was not enough up front thought put into the design (before writing code).
Slight tangent, but a good way to tackle that is to outline what you want to do (sketch the API you're going to fill in, etc), and run that by a reviewer