I will explain to you the derivation of Euler's formula simply.
define
$$
f(x)=\cos(x)+i\sin(x)\\
\partial_xf(x)=-\sin(x)+i\cos(x)=i(\cos(x)+i\sin(x))=if(x)
$$
from this you see that : $f(x)=e^{ix}$.
The reason we keep only the cosine term has nothing to do with the derivation.
We are interested in $\psi(x,t)$. With $\psi(x,t)$ some physical real observable, the idea is then to solve the equation for a complex $\psi$ which is easier and at the end of the calculations impose on your function to be real.
As an exemple consider the harmonic oscillator $\partial^2_x \psi +w^2\psi=0$ , the solution for a complex $\psi$ is $\psi=Ae^{iwx}+Be^{-iwx}$. Asking for a real $\psi$ gives $\psi = A \cos(wx+\phi)$ or equivalently $\psi = A \sin(wx+\phi)$.
So the answer is that, you need to solve your equation for a complex function ( which is simpler) and at the end of your calculations remember that your function mus be real.Which in many cases means taking the real part but not always.
Mathematically
The waves are solutions of the wave equation:
$$\Delta f - \frac{1}{v^2}\frac{\partial^2 f}{\partial t^2} = 0$$
This equation can be solved by many tools. The most elegant method is probably Fourier transformation; it allows us to separate the solution in coordinates (that's useful in some physics applications). The solution you mentioned $f = g(z-v/t) + h(z+v/t)$ is only one solution, but it doesn't cover the whole picture (understand the whole space of solutions).
Physically
We can find wave equation in few basics examples. The first one could be the string vibrating for small initial deviations. The other wave equation can be found in Maxwell equation for field $\vec E, \vec B$ or for scalar and vector potentials $\phi, \vec A$. It only means that these waves are physical, but these waves must still satisfy Maxwell equations.
In physics, this is only a special case of what we call waves. We have Klein-Gordon waves, Dirac waves (you will learn this in quantum field theory) or very simple equation from electrodynamics: waves in conductors. All these waves don't satisfy the wave equation in the classical meaning of \eqref{A}. But we can still call it waves.
So mathematically waves are strictly solutions of the wave equation \eqref{A}, physically we call disturbance in the space that are time-dependent or physical entities carrying information that is propagating from one place to another.
The word "wave" has its origin. Mathematicians in history (in post-renessaince era mostly) were working on the description of the musical instruments. So the first origin of waves was from mathematicians studying physical nature. I can recommend you this article [*].
Edit:
When Maxwell equations are reduced into wave equations, it really means that electromagnetic waves exists. That is because of existence of $\vec E, \vec B$. These fields exists, they carry momentum and energy. So if they are solution of the wave equation, they must be waves.
This led many of physicists to think that there is an aether, which is a medium where electromagnetic waves (as light) can be disturbance. And this is the problem known in special relativity when Michelson and Moorley proved that aether (even if it exists) is not important for electromagnetic waves. This experiment was proof for Einstein special relativity and it started the modern era of the physics.
[*] https://www.jstor.org/stable/41134001?seq=1#page_scan_tab_contents
Best Answer
As user1104 commented, you use Euler's identity:
$$ e^{ix} = \cos(x) + i \space \sin(x) $$
so:
$$ \sin(kx-\omega t) = \frac{ e^{i(kx-\omega t)} - e^{-i(kx-\omega t)}}{2i} $$
But we wouldn't normally proceed by replacing sin by this expression. Both the sin form and the exponential form are mathematically valid solutions to the wave equation, so the only question is their physical validity. In QM we don't worry about having a complex solution because the observable is the squared modulus, which is always real.
For a guitar string obviously the complex form isn't physically valid, but any sum of solutions to the wave equation is also a solution to the wave equation. That's why we can add (or subtract) the complex solutions to get a real solution.
Response to comment:
$$ e^{ix} = \cos(x) + i \space \sin(x) $$
so replacing $x$ by $-x$ gives:
$$ \begin{split} e^{-ix} &= \cos(-x) + i \space \sin(-x)\\ &= \cos(x) - i \space \sin(x) \end{split} $$
because $\cos(x) = \cos(-x)$ and $\sin(x) = -\sin(-x)$. So subtracting $e^{-ix}$ from $e^{ix}$ gives:
$$ \begin{split} e^{ix} - e^{-ix} &= \cos(x) + i \space \sin(x) - \cos(x) + i \space \sin(x)\\ &= 2i \space \sin(x) \end{split} $$
therefore:
$$ \frac{e^{ix} - e^{-ix}}{2i} = \sin(x) $$