Time Evolution Postulate: A pure state $|\psi(t_0)\rangle$ in a Hilbert Space $ \mathbb{H}$ evolves to another state $|\psi(t)\rangle$ is given by the time evolution operator $U(t,t_0)$
$$ |\psi(t) \rangle = U(t,t_0)|\psi(t_0)\rangle $$
where $U(t,t_0)$ is the solution of the initial value problem
$$ i \dfrac{d}{dt} U(t,t_0) = H(t)U(t,t_0) $$
$$ U(t_0, t_0) = \boldsymbol{I} $$
here $H(t)$ is a self adjoint operator also known as the Hamiltonian.
If you think about quantum circuits, then you will see that the circuit start at some initial state, usually $|0\rangle^{\otimes n}$, then you evolve this state to another state. This then must follow the above postulate. That is, the quantum gate, says $V$, that takes the state $|\psi (t_0)\rangle$ to $|\psi(t) \rangle$ must be $V = U(t,t_0)$.
Now, it turns out that from the way $U$ is defined, it is unitary. This can be shown as follow:
For any $|\psi\rangle \in \mathbb{H}$
\begin{align}
\dfrac{d}{dt} \|U(t,t_0) \psi\|^2 &= \dfrac{d}{dt} \langle U(t,t_0) \psi| U(t,t_0) \psi \rangle\\
&= \langle \dfrac{d}{dt} U(t,t_0) \psi| U(t,t_0) \psi \rangle + \langle U(t,t_0)\psi| \dfrac{d}{dt} U(t,t_0) \psi \rangle \hspace{1 cm} \textrm{product rule}\\
&= \langle -iH(t)U(t,t_0)\psi | U(t,t_0) \psi \rangle + \langle U(t,t_0) \psi | -iH(t)U(t,t_0) \psi \rangle \\
&= i\bigg(\langle H(t) U(t,t_0) \psi | U(t,t_0)\psi \rangle - \langle U(t,t_0)\psi | H(t) U(t,t_0) \psi \rangle \bigg) \hspace{0.5 cm} \textrm{since} \ \ \langle c \psi | \phi \rangle = c^*\langle \psi | \phi\rangle \\
&= i\bigg(\langle H(t)^* U(t,t_0) \psi | U(t,t_0)\psi \rangle - \langle U(t,t_0)\psi | H(t) U(t,t_0) \psi \rangle \bigg) \\
&= 0 \hspace{0.75 cm} \textrm{since}\hspace{0.5 cm} \langle A^* \psi | \phi \rangle = \langle \psi | A \phi \rangle
\end{align}
This tells us that $ \|U(t,t_0) |\psi \rangle \|$ must be a constant. And since $U(t_0, t_0) = \boldsymbol{I}$ so $\|U(t_0,t_0) \psi \| = \|\psi\|$ we must have $\| U(t,t_0) \psi \| = \|\psi\|$ as well.
Thus, $U(t,t_0)$ preserves the inner product. Hence, it is a unitary operator.
In summary, quantum gates are built from operator $U(t,t_0)$ generate from certain Hamiltonian $H(t)$ and $t$ by the time evolution postulate. And because of how $U(t,t_0)$ is formulated, it must be unitary. Thus, quantum gates are neccesary to be unitary.
Reference: Mathematics of Quantum Computing