if you don't have a bit turned on in the first 11 bits, you can't use a "is it zero" test to terminate the div/mod operation encoding it...
this is an operation that is going to be done on a computer, not on an embedded chip, it's less complex logic than running an iteration counter, in terms of C code it's one of the `for` clauses empty, because you only need the test in the middle, and don't need a counter
you have to do a test in the for loop anyway so being able to omit the counter is an optimization of complexity
i don't see what the point of this XOR operation means, 99.9999% of valid encodings are going to not satisfy the invariant of the check bytes of a BIP-39 master key mnemonic, how many bytes is the check? 24? 32? that's a lot of bits that are not gonna be right for a genuine random 32 byte key, more likely fail parity than not
also, isn't the BIP-39 check on the right side?
it's beyond an edge case, because it's also a user error on top of an infinitesimally small probability that a random key has a valid check