Why FFT of a rectangular pulse has imaginary part while the sinc function is real?
The even part of a real signal transforms to the real part of the DFT.  The odd part of a real signal transforms to the imaginary part of the DFT.  For example, the DFT of cosine, an even function, is strictly real, while the DFT of a sine, an odd function, is strictly imaginary.