There are two principals at work in this optical illusion. One is that we want to convert angles to right angles. In the process of doing that, the red lines become slightly bent.
Two, the black lines give the illusion of looking down a tunnel. We assume the tunnel is round. Since this “tunnel” looks round, the red lines also appear to be rounded.