In addition to minimizing main-lobe width to maximize frequency-resolution, we also want minimum side-lobe level.
The rectangular window provides an abrupt transition at its edge. This minimizes main-lobe width while maximizing side-lobe level among all windows in the normal (monotonically decaying away from time 0) case.
We will soon look at other windows having a more gradual transition to zero, thereby reducing side-lobe level.