Ahhhh yes you see you have got what is known as a critical capture. It's a 1/16 chance of happening. At this time, the pokeball only shakes once. It gives you an easier time catching as it only has to shake one time to catch. You can still fail to catch if it doesn't shake.