Electron states in a two-dimensional (2D) infinitely deep quantum well, having periodically corrugated walls, are analyzed. It is shown that corrugation causes resonant interaction between the transverse modes of the electron wave function. The interaction results in the non-Bragg nature electron resonances, which give rise to opening of additional band gaps, besides usual Bragg gaps. The position of the non-Bragg and Bragg gaps in the quantum-well band structure depends on a period of corrugation and thickness of the quantum well. For example, for a change in average thickness or period, at some of its value, one of the 2D levels becomes resonant, and it causes the level splitting and the creation of a 2D subband with the negative effective mass. The values of the effective mass and gap width depend also on the phase shift between two periodic boundaries. These quantities vary from zero to a maximum value upon shifting of one periodic boundary with respect to another on the half period of corrugation. In the well having the congruent periodic boundaries, there are no Bragg gaps in the band structure. The lateral periodicity causes the anisotropic stripelike electron-density distribution in such a periodic quantum well.