That is because the interference that causes diffraction occurs when the wavelength and the interfering thing is similar in distance. When the distance is spaced such that waves come out (reflect, transmit etc.) in phase, this will counter the diffuse scattering and other effects that generally occur, but only for a certain subset of the incident waves which is why the characteristic pattern of repeating dots occur.