OK, I was out "playing" trying different things with my S5200 and was finishing up and this sparrow landed in the bushes about 15 feet from me. I already had the zoom set to max, so I centered the bird in the frame and shot this, then the bird flew away. So since the bird is centered, why did the AF choose to focus on the far background instead of the centered image? How can I prevent it from doing this in the future?

Did you press the shutter button to halfway down to lock the focus on the bird before taking the snap? Don't think you did -focus bracket should reduce in size on the subject accompanied by a "Beep" (and the subject will be in sharp focus in your evf), once focus on the subject has been aquired.

Was the camera in "high-speed shooting" mode? In this mode the near focusing limit at full tele is about 13 feet. If the bird was slightly closer than you thought, it may have been too close for autofocus to work.