In the first image the near object demands attention due to its closeness, and the sharp focus on this object works well with this demand. The closeness and focus marry, and confirm attention on the object i.e. the cup. Within the second, the orange pumpkin and the photos behind it, the texture of the dried fruit are more focused, but they are less strong, as they are lost due to their position, their distance from the camera and their size. The cup here, out of focus, almost demands otherwise by its size and closeness. All these elements accumulate and make the image more complex. The first image presents the object and then follows it (moving left to right, as in reading) with context (but reduced to a blur). The second seems to hide the objects in context. I don’t feel the second image is unsuccessful but it is less immediate. It pulls the eye along the shelf, and gives the image motion (prehaps the first picture stalls, stopped by the closeness and focus of the first object), and we can identify the cup, but here we also gain other details. I think there is more information to gain from the second picture.
Am I now drawn more to the second picture? Immediacy vs complexity? In the end I think I am.
Focus at different distances and position can support or hinder the image. It depends on many things e.g. size, context, importance and the relationship to the surroundings of the object involved. Depth of focus and its position within the image are tools used to highlight and draw attention to elements within the photograph, to provide complexity, full stops or movement.