It helps with implementing double buffering, which is a technique used to avoid the screen flicker you get if you repeatedly update graphics on the screen: Wikipedia: Double Buffering.
This is needed only for AWT graphics - Swing does double buffering internally.