The counter should never toggle. The input logic being captured by the flop should always 0. B=A&!A causes a glitch that propagates. The enable would normally be synchronized to the capturing domain and then negated before ungating the clock. The circuit is designed to exaggerate and allow the glitch to propagate to illustrate the dangers.