The purpose of the prep is to get all of the stool out of your colon
so that the walls of your colon can be seen on the x-ray.
This is important as all the x-ray sees is what the barium
sticks too, be it your colon or whatever is in it. If the prep isn't good enough, you'll likely have to repeat it or go in for more invasive tests.
Answer assisted by David Miller, Medical Student