The Inferno is completely based upon poetic justice, which means that people in hell are being punished for what they did when they were alive. Poetic justice is like karma, what ever you do, comes back to you. Which all sums up to if your bad in earth, you are destined to hell and if your good, to heaven.
When Dante and Virgil arrive to view the 4 pouch of the Malebolge (eighth ring), they come to see a crowd of sinners moving slowly as in a procession. Their faces appear to be contorted, for they are facing their backs while tears come streaming down their backside. Here the diviners, seers, astrologers and magicians are being punished. Poetic justice is seen here, as these people that as while on earth wanted to see too far ahead of them, now they can only see that path they have already traveled. It's an ideal penalty for them, because as the definition of poetic justice says, what goes around comes around and they are now forced to look backwards into past, forever.