Landscape photographers prefer to stop down to f/22 or even narrower to keep everything in focus on the frame. But this narrowing down of aperture comes at a price; which is lens diffraction. Lens diffraction is the dispersion of light that happens due to the light hitting the blades of the diaphragm of the aperture. The sensor of the camera is no longer receiving the light straight at a perpendicular angle. Instead the light is bouncing off the edge of the aperture diaphragm blades and then hitting the sensor at different angles. As a result the resulting image is not sharp but soft. A blurry image circle is what can be noticed when one crops to 100% and inspects the sharpness of the image up close.
Though both the Diffraction & DOF are related to aperture, but not the same thing. Diffraction is a sharpness term & DOF is related to Focus.
Diffusion of light and its impact
Light hitting the sensor at an angle can cause diffusion. The light rays fall on different pixels overlapping and creating a blurry image that is not sharp when cropped really tight. Lens diffraction is thus the primary reason why when stopping down too much; there is a loss of sharpness instead of an increase.
Who is affected by it?
Lens diffraction is not a major issue for portrait photographers as they tend to shoot at wider apertures. It affects macro and landscape photographers more who tend to use a narrow aperture and keep the entire frame in focus.
It does not need a trained eye to notice lens diffraction. It can be easily detected by taking pictures of the same subject at different apertures and then comparing the final result. One is bound to notice that sharpness tends to increase as one stops down for a while starting at something f/4. Then as one keeps stopping down even further, sharpness is lost and the final results are fuzzy and soft.
The optical limitations of lenses means diffraction cannot be avoided at narrower f-stops. There cannot simply be a lens that is devoid of this problem. Even lenses from the Canon L series too are not devoid of this problem. As such as one starts to stop down diffraction and the resulting loss of smoothness is common.
Why smaller f-stop is used?
Photographers try shooting at lower f stops to get a bigger depth of field. At f/8 through till f/11 this is really visible when compared with the shots taken at f/5.6 or even wider. Sharpness also increases and so does the depth of field. But round about f/11 and beyond the loss of sharpness becomes prominent while the depth of field does not improve that much. At really narrow apertures such as f/32 and beyond, the pictures may appear they have not been focused properly.
The trade off: Bigger depth of field or sharper images?
There is a trade off between bigger depth of field and sharpness of the image. The best performance of each individual lens varies from f-stop to f-stop. This is why it is best to test the quality of the lens by taking several shots in the same lighting condition but at different f-stops and then checking the sharpness to figure out at what aperture the lens is both sharpest and gives the maximum DOF.