It's nearly two decades since I studied this and I'm a bit (a lot!) rusty but it is due to the symmetry of the crystal lattice of the semiconductor (which is linked to the atomic orbitals of the atoms in the crystal). It is not momentum as such that is important but a related vector called "crystal momentum" (https://en.m.wikipedia.org/wiki/Crystal_momentum
). IIRC if the crystal momentum of the electron in the valence band is the same as that of the hole in the conduction band that is a direct band gap, if they are different it is an indirect band gap.
As I say it's been a while and that is about all I remember!