This optical illusion is taking advantage of the 3D drawing techniques of perspective angles and shading to create this impossible drawing.
If this were a normal object, the corners would be drawn in proper perspective so that the other cube is in front. The use of shading also helps us track and believe this 3D optical illusion.