I happened upon a nice simulation of Huygens Principle written by Walter Fendt and decided to look at a Huygens Principle approach to the reflection grating and so rewrote my answer.
If the separation of the secondary sources is less than the wavelength of the incident light you get reflection with the angle of incidence equal to the angle of reflection.
The same is true if the separation of the sources is greater than the wavelength of the incident light.
However because of the overlap of the Huygens wavelets in the forward direction there are other directions in which there is reinforcement of the light.
In the diagram below the angle of incidence is still $30^\circ$ but now there are wavefronts at an angle of $23.7^\circ$.
For this arrangement with an angle of incidence of $37^\circ$ and with the secondary source spacing equal to five times the wavelength of light there are maxima in four directions.
In the real world there are no point secondary sources rather a reflecting region as in the OP's diagrams.
The full analysis becomes more complex because each of those reflecting surface produce diffraction and then those waves overlap with the waves from the other reflecting surfaces to form an interference pattern as described above.
CDs and DVDs also show this effect.