People have this idea that 'martial arts' are strict rulesets that must never be broken. But that is nonsense. In a fight you have to adapt to the situation and do whatever you need to. Learning a martial art is not about being told how you must fight. It's about ingraining certain principles and movements into your mind and body, so that you can act swift and effectively when there is no time for hesitation. Depending on your needs and circumstances, these principles can change freely. Which is why no school is like the other, even if they are based on the same core martial art.
Simply put, it is more accurate to think of martial arts as combat suggestions, not as rules. Because there are no rules when your life is on the line.
Rules exists in sports. And nowadays most of us understand (not-so-)martial arts as something you do for sport. And so we have this misconception that the same rules apply to both things.