The discrete fourier transform of $x = (x_{0},\dots,x_{N-1})$ is defined as
$\displaystyle X_{k} = \sum_{n=0}^{N-1} x_{n}\omega^{kn}_{N}$
where $\omega^{kn}_{N} = e^{-2\pi ik/N}$ and $k\in\mathbb{Z}$. One problem that arises in practical analysis is called spectral leakage. The image below (from here) attempts to illustrate the origin of the problem. Now, given the definition of the DFT, I do not understand why the DFT would see the measured signal (middle figure) as the signal in the bottom figure.
I know that the DFT is periodic, i.e. $X_{k}=X_{k+N}$, but that is about the transform repeating itself, not the time domain signal.
Could someone help me to understand the mathematical reason behind this? I'm not very good in math, so simplicity and not omitting steps would be a plus.
Also
Fourier Transforms implicitly assumes that the signal essentially repeats itself after the measured interval.
where does this assumption come from?

It's a misnomer to say "The DFT is periodic". It appears that you are learning about the DFT from a signal processing or engineering book. They teach the DFT the way you have explained, which can lead to confusion.
A much more clear way to think about the DFT is to think of it as a linear transformation from a finite vector space to a finite vector space. If we call this transformation $F$ then $F:\mathbb{C}^N\rightarrow\mathbb{C}^N$.
This fact is somewhat hidden in the example you show since you plotted continuous functions. In fact, the DFT accepts a discrete vector and outputs a discrete vector. It's a linear transformation, and it can be represented as a matrix.
So why do they say the DFT is periodic? And how does it benefit us. The answer is that an element of $\mathbb{C}^N$ is isomorphic to a periodic sequence that has a period of $N$. That is, they're basically the same thing. You've lost no information if you convert a periodic sequence into a vector from $\mathbb{C}^N$, and you've gained no information if you take a vector in $\mathbb{C}^N$ and periodically extend it. Also, if you were to calculate the DFT coefficients according to the formula you present, you would see that the sequence $X$ is periodic. That is, $X_{k+N}=X_k$. But, in the inversion, we would still just use $N$ elements of the DFT sequence.
Thinking of the DFT as an analysis of a periodically extended vector provides us with some intuition. In the example you show, you might expect the signal to have a very narrow band of frequencies (or possibly a single frequency) with significant energy. However, due to the jump associated with the periodicity we would get energy at higher frequencies than we might expect.