lets consider Fourier Transform of function $ f(t) = \begin{cases} e^{-t}, & \text{for $t\ge 0$ } \\ -e^t, & \text{for $t\lt0$ } \end{cases}$ with Fourier Transform $F\{\omega\}= \frac{-1}{i\omega-1}+\frac{1}{i\omega+1}$
Magnitude and phase plots below:
With all phases equal to zero this means that signal can be recreated with infinite amount of pure cosine waves each with diffrent frequency and amplitude but same property at t=0, which is positive value at that point. There is like infinite number of cosine waves only beetween $\omega=0$ and $\omega=0,00000001$, so how is that possible all of these sum to 1 at t=0?
They'd need to be sine waves, not cosines, as the function $f$ is odd. The function is discontinuous at the origin, with 'average value' zero ($+1$ to the right, $-1$ to the left), which is what the Fourier series would give you at $t=0$. When $f$ is discontinuous, agreement of the function and its Fourier series becomes difficult (I realise that's a vague statement but I suspect you're not after a fancy justification).