If you saw both tables in the real, physical, natural world, because of the effect of perspective, the table on the left is indeed physically longer than the width of the table on the right. Our brain is correctly inferring this from perspective/trigonometry. The visual system is designed to correctly interpret the natural world, not correctly interpret lengths of line segments on a slide. This illustrates how hard it is to create computer algorithms that robustly infer 3D from 2D (this inference requires taking cues from shading, perspective, etc.)
Almost all optical illusions are examples of the strength, not weakness, of the human brain.
EDIT: I've emphasized the word "natural". The problem with the below examples of "illusions" constructed in the physical world is this: what do you expect the brain to do otherwise? When you see a scene in the world, is it a weakness that our brain discards the (extremely unlikely) possibility the scene is just a massive hologram five inches from your eyes, or a meticulously painted and lit cardboard scene? I don't.