Why is the electromagnetic wave equation derived from Maxwell's equations with no charges? After having consulted numerous physics books, forums and videos, in all cases I found that the electromagnetic wave equation is derived from taking as a premise that the medium is a vacuum. This causes the charge density and current density to be zero in Maxwell's equations, which leads to the electromagnetic wave equation. Unfortunately, the only explanations I have found for making such a premise are:

*

*"Electromagnetic waves can travel in a vacuum."

*"The electric and magnetic fields of a wave are perpendicular to each other and, in turn, the wave vector is perpendicular to these."

*"Not taking this premise into account causes the electromagnetic wave equation to be inhomogeneous."

Personally, I find these explanations insufficient, since if I were Maxwell trying to derive the electromagnetic wave equation in the 19th century, how would I go about knowing these facts beforehand?
That said, I would love to know what Maxwell realized that allowed him to make that assumption.
 A: Taking the curl of Faraday's law yields
$$\nabla \times\big(\nabla \times \mathbf E) = \nabla \times \big(-\frac{\partial \mathbf B}{\partial t}\big)$$
$$\implies -\nabla^2\mathbf E + \nabla(\nabla \cdot \mathbf E) = -\frac{\partial}{\partial t}(\nabla \times \mathbf B) = -\frac{\partial}{\partial t}\left(\mu_0 \mathbf J + \epsilon_0 \mu_0 \frac{\partial \mathbf E}{\partial t}\right)$$
$$ \implies \left(\epsilon_0\mu_0 \frac{\partial^2}{\partial t^2}-\nabla^2\right) \mathbf E = \frac{\nabla \rho}{\epsilon_0} - \mu_0 \frac{\partial \mathbf J}{\partial t}$$
where we've utilized Ampere's law and Gauss' law. We observe that $\mathbf E$ obeys the inhomogeneous wave equation with source $\nabla\rho/\epsilon_0 - \mu_0 \partial \mathbf J/\partial t$.  Clearly if $\rho=\mathbf J=0$, then this equation reduces to the homogeneous case, which is a good starting point simply because it's easy to solve; it's also interesting because apparently electromagnetic waves can travel in vacuum, and do so with speed $c \equiv 1/\sqrt{\epsilon_0\mu_0}$.
I'm not sure what you mean by something allowing Maxwell to make an assumption. You can make whatever assumptions you want, under any circumstances. Whether those assumptions yield an accurate model of the phenomena you're trying to understand is a different question, but when faced with a difficult problem it is usually a good idea to solve the simplest cases to gain some intuition for what's going on.
A: Nothing prevents one from doing the derivation in the presence of sources. In this case, the equations turn out to be
\begin{align}
\nabla^2 \mathbf{E} - \mu_0 \epsilon_0 \frac{\partial^2 \mathbf{E}}{\partial t^2} &= \frac{1}{\epsilon_0}\mathbf{\nabla}\rho + \mu_0\frac{\partial \mathbf{J}}{\partial t}, \\
\nabla^2 \mathbf{B} - \mu_0 \epsilon_0 \frac{\partial^2 \mathbf{B}}{\partial t^2} &= - \mu_0\mathbf{\nabla}\times\mathbf{J}.
\end{align}
There is no mathematical difficulty in arriving at these expressions and they can be derived by employing the very same techniques one uses in the vacuum case. Notice that, indeed, there are inhomogeneous wave equations, which means they include source terms.
Nevertheless, one is quite often interested in studying what happens in space free of charges. For example, this represents the situation inside an ideal waveguide, or the situation in which the light emitted by stars comes to us. Hence, it is often of particular interest to consider the specific situation in which sources are not present.
One can make these simplifying assumptions before or after deriving the wave equations. I personally see no reason to do it before, since the computations don't get much more difficult when considering the sources, and can also bring some more intuition to results such as the Jefimenko equations (see, e.g., this paper). Nevertheless, whenever you do the assumption, it is justified by the fact that quite often we are concerned with what happens in regions void of charges (even if there are charges somewhere else).
