Unlikely to be common behavior. The tally would come back at the end of a shift or day and the person doing that would be reprimanded, then fired if it continued. It would be enforced by the manager/s.
Now, would they press a random demographic button after that (instead of the same button every time)? Maybe, however there are numerous other ways to increase compliance in that case as well. If the logs kept coming back sketchy, well the cashiers are on tape - bam, another firing (note from the video tape: cashier intentionally hits male button when it's obviously a female, then repeats the behavior multiple times). Eventually the example gets across to the other workers to at least make an effort.