As the brain does not have direct contact with the world, but only an image of the world on the retina which is ambiguous, it has to call on the statistics of how it behaved in the past to understand how to behave in the future.
CNN: Robots tricked by optical illusions