There are several problems with focusing.
Two have been discussed already:
• Many cameras are set by default to choose where to focus.
Again, if this feature performs poorly for you, set your camera to focus on the middle of the frame.
• If your camera is set to focus in the middle area of the viewfinder, and you're photographing something that's NOT in the middle, the focus may be off.
Here are two more possible focusing problems.
Cameras have difficulty focusing if the light is dim, or if the scene has no contrast (same tone or color).
Use manual focus.
Because the focus is often set in the middle of the frame, many photographers always center the subject in the frame.
This is called bulls-eye composition.
If you were the late Richard Avedon, the fashion and portrait photographer, you can get away with it.
Everyone else should position the subjects in the frame according to what's best for each situation.