Should cement board be glued and screwed to the studs?
Yes, but not just for rigidity.

Cement board is made of, well, cement - and cement is brittle.

When you screw the cement board in you create a pressure point or stress point.  Even though the board is screwed in with lots and lots of screws, each screw hole is a stress point prone to breakage.

By gluing the board as well as screwing, you ensure that a much larger surface area of the board ultimately bonds to the wood (as the glue cures) - which means that if a single stress point fails, it won't matter, because the glue holds the board tight where the screw hole may have failed.