All logic should serve a business purpose.
There’s a fun phrase, I believe it came from DHH, “test damaged development”. It occurs when a developer finds that in order satisfy his tests, he has to introduce some new logic to the code that doesn’t serve any practical business purpose. When this occurs, it is a bad thing.
Getting TDD right takes a lot of practice and this is one of the traps that some people fall into. Try to avoid it.
When you find yourself adding unnecessary logic, it’s a good time to pause and bring in a fresh set of eyes. Maybe there’s a better way of doing things. Adding code for coding’s sake is not good.