Diane used short depth of field in this photograph to emphasize the woman and make her the sole focal point of the image. You can tell because of how blurred everything is behind her, the location is indistinguishable.
Ansel used long depth of field in this photograph in order to capture the falls with a foreground framing of trees. This depth of field gives the composition the framed look rather than just being a textbook shot of a water fall.
A short depth of field would take away from Ansel’s composition, as a long depth of field would take away from Diane’s composition.