We've been enforcing this rule for long enough that most animals avoid attacking humans even if they could easily kill us. The rule has been written into their genes through sheer evolutionary pressure.
Except house cats, of course. Somehow we've bred them to attack us with impunity.