Why this two ways of FFT are different?
In both cases, you are creating a sinusoid (y) that goes through exactly one cycle during the observation window of the FFT.  The only difference is the phase at which the sinusoids begin.  The latter starts at zero, while the former starts exactly one half cycle offset (-pi/2). The phase of an FFT coefficient reflects the cyclical timing offset of the sinusoid that coefficient represents.