The mechanism is simple and once you have it, every warping problem you will ever have becomes predictable.
Paper is made of fibres that mostly lie in one direction, the direction the sheet travelled during manufacture. That is the grain.
Fibres swell across their width far more than along their length. So when paper takes on moisture, from glue, from paste, from the air: it expands noticeably across the grain and barely at all along it. It is not a small difference; it is several times.
Now your covers. A cover is board plus paper plus whatever is inside, glued together. When you apply wet adhesive, one layer wants to expand across its grain. If the layers disagree about which direction that is, they fight, and the assembly curls toward whichever side is pulling harder. Then as it dries and shrinks, it curls again, sometimes the other way - which is exactly your inconsistent result.
The rule that falls out of it: grain runs parallel to the spine, in every component - the board, the covering paper, the endpapers, and the pages. Then everything expands and contracts in the same direction, and instead of fighting, they move together. The spine can accommodate that movement; the width cannot.
That is also why a book with the grain wrong feels stiff and refuses to open flat. The pages are resisting the fold in the direction they least want to bend.