It works as I wrote it

Let’s face it, humans are bad in observing our own mistakes; we miswrite, misread, misunderstand, and miscommunicate often, without realizing it.

As unit tests are often written by the same person who writes the code that is being tested, there is a chance that any mistakes in the code will be duplicated in the unit tests as well. Or vice versa in case of test driven development.

It’s not that uncommon, that some of the unit test makes sure that the code misbehaves. But at least such tests make sure the misbehavior happens in a systematic manner.