FFT of sine wave not coming as expected i.e single point
Acually Matt's answer already gives one view on the problem here: the DFT is implicitly periodic in both time and frequency domain (see this question). From your parameters we can calculate that your observation period is 1 s. That means you observe 50 periods of a 50 Hz tone. Periodically extending that observation interval will always result in a seemless sine wave. If you take the 50.1 Hz tone, you're transforming 50.1 periods of an oscillation. Periodically extending that signal will result in phase jumps that cause additional spectral tributaries.

Another view is the frequency resolution that is defined as $f_\mathrm{s}/N_ \mathrm{DFT} = 1024 \text{Hz}/1024 = 1 \text{Hz}$. As 50 Hz is an integer multiple of 1 Hz, this tone can be reresented by a single DFT bin. As the result of the DFT is discrete values that are space 1 Hz apart, a 50.1 Hz cannot be represented by a single bin and the energy is smeared over the frequency domain. In your example this is the reason for the slightly asymmetric magenta spectrum and for the lower magnitude of the 50 Hz bin compared to the 0.7 magnitude of the 50 Hz spectrum.

Both effects described above contribute to the spectrum you're observing.