Flip Matrix restriction

Just great! But I don’t understand at all why it works, what is the logic?