Although they "fool the eyes," optical illusions are testaments to the strengths, rather than the weaknesses, of our visual system. When we are presented with ambiguous or contradictory information, our brain immediately attempts to resolve the picture into a consistent scene.
In the pulsating square illusion, we see very little of the rotating blue square when the yellow occluding squares are large. In fact, we can only see the edges of the blue square through the four narrow slits formed by the yellow squares. As the blue square rotates, its edges, as seen through the slits, rise and fall from the center. Because the slits divide up the motion of the blue square into segments that are spaced far apart, this in -and -out motion of the edges has greater perceptual salience than the rotation of the blue square.
In other words, because information about the blue square's motion is ambiguous, our visual system concentrates on the most noticeable features, the movement of the edges. Since the edges' most prominent motion is in and out, the blue square appears to pulsate. As the yellow occluding squares shrink, the salience of the blue square's rotation increases, and we no longer perceive that the blue square is pulsating.