This famous photograph was taken by Bob Jackson. It was a complete accident. He had gotten the shot all set up and was waiting for Oswald to walk past so he could get a good angle. He had his finger on the trigger button and was waiting. The gun shot went off which startled him and his finger pressed the button.
I heard this on one of my photography podcasts and thought it was a neat story.