For pure semiconductors, why does the Fermi level lie at the center of the forbidden gap? For an intrinsic semiconductor, the position of the Fermi level in the energy band diagram is half-way between the topmost level of the valence band and lowermost level of the conduction band i.e. lies at the centre of the forbidden gap. Why?
 A: In general, it is close to the centre of the gap but slightly offset. This can be seen nicely by using the effective density of states approximation for conduction and valence band, $N_c$ and $N_v$ respectively.
For an intrinsic semiconductor the electron density in the conduction band (that has energy $E_c$) is equal to the hole density in the valence band (that has energy $E_v$),
$$
n_i = n = N_c e^{\left(E_i - E_c\right)/\beta} 
$$
$$
n_i = p = N_v e^{\left(E_ v- E_i\right)/\beta}
$$
where $\beta=kT$ and $E_i$ is the intrinsic Fermi-level.
Dividing these two equations and solving for $E_i$,
$$
E_i = \frac{E_c-E_v}{2} + \frac{1}{2}\beta\log_e\left(\frac{N_v}{N_c}\right)
$$
The first term puts the Fermi-level exactly at mid-gap, and the second term shifts it a little.
If we substitute in with values for the effective density of states we can see the reason is that the conduction and valence bands have different curvature on account of different effective masses.
$$
E_i = \frac{E_c-E_v}{2} + \frac{3}{4}\beta\log_e\left(\frac{m^*_h}{m^*_e}\right)
$$
For example, GaAs, $m^*_e=0.063m_0$, $m^*_h=0.51m_0$ at $T=300K$ the intrinsic Femi-level is only shifted from mid-gap by a small amount,
$$
E_i = \frac{E_c-E_v}{2} + 40meV
$$
considering that $E_c-E_v=1.42eV$ that’s about a 3% shift of the total range. Or about 1.5$kT$ at room temperature.
A nice resource for this sort of thing is this online book from University of Colorado, http://ecee.colorado.edu/~bart/book/book/contents.htm
