Byte location of plaintext vs ciphertext when using a block cipher or stream cipher
But why?


It is because the cipher is designed with the avalanche effect property. Namely, changing a single bit in the plaintext (or key) should result in a significant change in the ciphertext. So really, it happens because ciphers are designed with that property.


  What is happening behind the scenes?


Really it is the entire cipher. If you look at a cipher generically as substitutions and permutations, it is the substitutions which really cause the effect, but even then, the permutations contribute to it when multiple rounds are used.