This article is from the Photographic Lenses FAQ, by David Jacobson with numerous contributions by others.
When a beam of light passes through any aperture it spreads out. This effect limits how sharp a lens can possibly be.
The diffraction is caused by the limiting of the beam to the size of the aperture, not primarily by sharp edges of the aperture. Even if one made a "soft edged" aperture that faded slowly from clear to opaque, there would still be diffraction, and the size of the central part of the diffraction pattern would not change much compared with the sharp-edged case.