To stop a short circuit I think. I just remember we always used a resistor to charge ours when we were learning, or perhaps that was varying the speed of charging.
Also, you could have to plot a current against time graph and use the area under it to find out the charge that went on to the capacitor, measure the pd across it and use Q = CV to work out the capacitance. I just don't know- it could be anything!