When set variable is the last block in a rule, it takes a frame. This only really makes sense if the only blocks in the rule take 0 frames.
For example, this code takes 2 frames:
This takes 1:
It would make more sense for both to take one, since there is a wait 0 block in both, which takes a frame.