It isn't a problem because two of the eight equations are constraints and they're not quite independent from the remaining six.
The constraint equations are the scalar ones,
$$ {\rm div}\,\,\vec D = \rho, \qquad {\rm div}\,\,\vec B = 0$$
Imagine $\vec D=\epsilon_0\vec E$ and $\vec B=\mu_0\vec H$ everywhere for the sake of simplicity.
If these equations are satisfied in the initial state, they will immediately be satisfied at all times. That's because the time derivatives of these non-dynamical equations ("non-dynamical" means that they're not designed to determine time derivatives of fields themselves; they don't really contain any time derivatives) may be calculated from the remaining 6 equations. Just apply ${\rm div}$ on the remaining 6 component equations,
$$ {\rm curl}\,\, \vec E+ \frac{\partial\vec B}{\partial t} = 0, \qquad {\rm curl}\,\, \vec H- \frac{\partial\vec D}{\partial t} = \vec j. $$
When you apply ${\rm div}$, the curl terms disappear because ${\rm div}\,\,{\rm curl} \,\,\vec V\equiv 0$ is an identity and you get
$$\frac{\partial({\rm div}\,\,\vec B)}{\partial t} =0,\qquad
\frac{\partial({\rm div}\,\,\vec D)}{\partial t} =-{\rm div}\,\,\vec j. $$
The first equation implies that ${\rm div}\,\,\vec B$ remains zero if it were zero in the initial state. The second equation may be rewritten using the continuity equation for $\vec j$,
$$ \frac{\partial \rho}{\partial t}+{\rm div}\,\,\vec j = 0$$
(i.e. we are assuming this holds for the sources) to get
$$ \frac{\partial ({\rm div}\,\,\vec D-\rho)}{\partial t} = 0 $$
so ${\rm div}\,\,\vec D-\rho$ also remains zero at all times if it is zero in the initial state.
Let me mention that among the 6+2 component Maxwell's equations, 4 of them, those involving $\vec E,\vec B$, may be solved by writing $\vec E,\vec B$ in terms of four components $\Phi,\vec A$. In this language, we are left with the remaining 4 Maxwell's equations only. However, only 3 of them are really independent at each time, as shown above. That's also OK because the four components of $\Phi,\vec A$ are not quite determined: one of these components (or one function) may be changed by the 1-parameter $U(1)$ gauge invariance.
To begin with, Maxwell's equations are vector partial differential equations, which makes their solution intrinsically more difficult than that of scalar partial differential equations.
To help obviate this difficulty, an ansatz was long ago made (by Hertz himself, perhaps?) who proposed two useful categories of wave solution: transverse electric (TE), and transverse magnetic (TM). The term 'Transverse' here means 'transverse to the waveguide axis', which is conventionally the 'z' direction, and the presumed direction of propagation.
These categories are somewhat self-explanatory. TM waves have no z directed magnetic field component, and TE waves have no z directed electric field component. Each of these is derivable as the curl of an appropriate vector potential, magnetic or electric. If the idea of an electric vector potential is troublesome to you, try the book by Harrington 'Time Harmonic Electromagnetic Fields.' (With no denigration of Griffiths, I advise that you widen the scope of your reading.) In either case the vector potential is assumed to have a single, z-directed, component, comprising a scalar function of the form f(x,y)exp(ikz). This entire scalar function is presumed to satisfy the scalar Helmholtz equation (with propagation constant k), which insures that taking its curl (and the curl of the resultant) will lead to Maxwell's equations.
In essence, TE and TM waves are assumed; these ideas came out of someone's brain. Their justification is that they lead us (as noted) to Maxwell's equations, and from there to innumerable useful solutions and applications. Inasmuch as a waveguide is designed to propagate a monochromatic wave of some chosen frequency, the simplest form of traveling wave solution is exp(ikz), as noted. As far as why one wants a monochromatic wave, one answer would be that (at a guess) >90 % of communication electronics involves the modulation of a carrier wave, with the frequency bandwidth of modulation typically small in comparison to the carrier frequency.
Sorry to go on at such length. I hope this helps.
Best Answer
Bare with me, I don't remember every little step, but I hope this derivation helps you.
First remember how a wave travels through a waveguide (dielectric).
$$ E(x,y,z) = E^{0}(x,y)e^{-\gamma z}$$ $$ H(x,y,z) = H^{0}(x,y)e^{-\gamma z}$$
Then consider Ampere's and Faraday's Laws for a source-free region. $$ \triangledown \times H = j\omega\epsilon E $$ $$ \triangledown \times E = -j\omega\mu H $$
This produces 3 equations each (for the x, y and z directions):
$$ 1) \frac{\partial E_{z}}{\partial y} + \gamma E_{y} = -j\omega\mu H_{x}$$ $$ 2) \frac{\partial E_{z}}{\partial x} + \gamma E_{x} = j\omega\mu H_{y}$$ $$ 3) \frac{\partial E_{y}}{\partial x} - \frac{\partial E_{x}}{\partial y} = -j\omega\mu H_{z}$$ $$ 4) \frac{\partial H_{z}}{\partial y} + \gamma H_{y} = j\omega\epsilon E_{x}$$ $$ 5) \frac{\partial H_{z}}{\partial x} + \gamma H_{x} = -j\omega\epsilon E_{y}$$ $$ 6) \frac{\partial H_{y}}{\partial x} - \frac{\partial H_{x}}{\partial y} = j\omega\epsilon E_{z}$$
We can combine (1) and (5) and combine (2) and (4) due to like terms to generate equations for $H_{x}$ and $E_{x}$ which become (7) and (9). We rearrange equations (3) and (6) for $H_{y}$ and $E_{y}$, respectively.
$$ 7) H_{x} = \frac{-\gamma}{h^2} \frac{\partial H_{z}}{\partial x} + \frac{j\omega\epsilon}{h^2} \frac{\partial E_{z}}{\partial y}$$
$$ 8) H_{y} = \frac{-\gamma}{h^2} \frac{\partial H_{z}}{\partial x} - \frac{j\omega\epsilon}{h^2} \frac{\partial E_{z}}{\partial x}$$
$$ 9) E_{x} = \frac{-\gamma}{h^2} \frac{\partial E_{z}}{\partial x} - \frac{j\omega\mu}{h^2} \frac{\partial H_{z}}{\partial y}$$
$$ 10) E_{x} = \frac{-\gamma}{h^2} \frac{\partial E_{z}}{\partial y} + \frac{j\omega\mu}{h^2} \frac{\partial H_{z}}{\partial x}$$
And remember $ h^{2} = \gamma^{2} + \beta^{2}$, where $\beta = \omega \sqrt{\mu\epsilon}$
Transverse components $E_{x}, E_{y}, H_{x}, H_{y}$ are expressed in terms of the longitudinal components $E_{z}, H_{z}$. And we are given three cases:
1) Transverse Electric (TE): $$ E_{z} = 0, H_{z} \neq 0$$
2) Transverse Magnetic (TM): $$ E_{z} \neq 0, H_{z} = 0 $$
3) Transverse Electromagnetic (TEM): $$ E_{z} = H_{z} = 0 $$
Where in the case of TEM modes equations (7) through (10) break down unless $ h = 0 $ meaning: $$ \gamma^{2} + \beta^{2} = 0 $$ $$ \gamma^{2} = -\beta^{2} $$ $$ \gamma = j\beta = j\omega\sqrt{\mu\epsilon} $$
Now here we need to bring in the Helmholtz equation to solve the partial differential for TE and TM modes: $$ \triangledown^{2} A + k^{2}A = 0 $$
In TE modes, we need $H_{z}$, which is our $A$ in the Helmholtz equation, and our factor $k^{2}$ is $\beta^{2}$.
Substituting: $$ \triangledown^{2} H_{z} + \beta^{2} H_{z} = 0 $$
Expand: $$ \frac{\partial^{2} H_{z}}{\partial x^{2}} + \frac{\partial^{2} H_{z}}{\partial y^{2}} + \frac{\partial^{2} H_{z}}{\partial z^{2}} + \beta^{2} H_{z} = 0 $$
$$ \frac{\partial^{2} H_{z}}{\partial z^{2}} = -\gamma^{2}H_{z}^{0}(x,y)e^{-\gamma z} $$
$$ \frac{\partial^{2} H_{z}^{0}}{\partial x^{2}} + \frac{\partial^{2} H_{z}^{0}}{\partial y^{2}} + (\gamma^{2} + \beta^{2})H_{z}$$ Since $h^{2}$ = $\gamma^{2} + \beta^{2}$ we conclude: $$ \frac{\partial^{2} H_{z}^{0}}{\partial x^{2}} + \frac{\partial^{2} H_{z}^{0}}{\partial y^{2}} + h^{2}H_{z} = 0$$
Repeat the same steps above for TM modes, where we need $E_{z}$
$$ \triangledown^{2} E_{z} + \beta^{2} E_{z} = 0 $$
And therefore: $$ \frac{\partial^{2} E_{z}^{0}}{\partial x^{2}} + \frac{\partial^{2} E_{z}^{0}}{\partial y^{2}} + h^{2}E_{z} = 0$$
Now the reason for there being only two sets of components is due to the fact that the wave propagates along a single direction given the waveguide. The key factor being that Electric and Magnetic Fields are ALWAYS perpendicular to eachother. This is a primary principle that Maxwell discovered. The two always travel together in electromagnetic waves.
For example:
Where in TM modes the electric field is in the direction perpendicular to that of propagation, so ONLY the magnetic field propagates within the waveguide, and vice versa for TE modes. This is why the electric or magnetic components are considered 0 (given that we're assuming z to be the direction of propagation).
So you have two instances for TM and TE waves, where the electric field is zero or the magnetic field is zero - why you have two sets of equations.
This differs in TEM modes where neither propagate in the direction of the waveguide, however at least two conductors are required for any TEM modes to exist.