This is true (i.e., the struggle is productive) only if the struggle allows for students to develop the intuition of the subject required for synthesis.
Even then, before you get to that point, you have to prime students for it. Throwing them into the deep end without teaching them to float first will only set them up to drown. This does typically mean lots of worked motivating (counter-)examples at the outset.
It's a big reason why we spent so long on continuity and differentiability in my undergraduate real analysis class and why most of the class discussion there centered on when a function could be continuous everywhere but nowhere differentiable. Left to our own devices and without that guidance, our intuition would certainly be too flawed for such a fundamental part of the material.
I would argue that understanding the pathological behavior in something is critical to developing an accurate intuition for it, yes. These cases don't show up often, but when it comes to having a good sense of smell for when part of a proof is flawed, it really helps to have that olfactory memory.
Aside from that, understanding counterexamples teaches you to understand the definitions and theorems better. Which matters for proving future results.
Even then, before you get to that point, you have to prime students for it. Throwing them into the deep end without teaching them to float first will only set them up to drown. This does typically mean lots of worked motivating (counter-)examples at the outset.
It's a big reason why we spent so long on continuity and differentiability in my undergraduate real analysis class and why most of the class discussion there centered on when a function could be continuous everywhere but nowhere differentiable. Left to our own devices and without that guidance, our intuition would certainly be too flawed for such a fundamental part of the material.