The single word explanation of why one cannot focus everything is ‘aberration’. Aberration is all of the little errors that happen to screw up the image. As u/whyisthesky mentioned, geometry is one of the biggest issues. Your camera lens is a one size fits all arrangement and it is not matched to the shape of your object. You can get a perfect image, at least geometrically, if the shape of your lens “matches” the shape of the object. (You won’t ever get a perfect image, but you hopefully get the idea.)
Color is another common aberration because each color of light moving from the object to the camera will have a different focal position. You can see this in some images because some colors will be out of focus.
All of the aberrations in the object/camera system add up to an image where you have to focus as best you can and usually that means you focus on a particular part of the object, e.g. the face of a person instead their entire body.
Latest Answers