Earlier quoted context omitted.
Killing something because it mistakenly wandered into your periphery isn't exactly what I'd call pragmatic. If our solar system drifts too close to another civilization I don't want to get squashed. That's the maxim. We are the fly. If you don't want something bigger than you to be entirely justified in killing you for no reason, you cannot believe yourself to be entirely justified doing the same. The golden rule is…
If you're going to apply the golden rule to amoral objects such as flies, it should also apply to, for instance, bubblegum. You should refrain from chewing bubblegum and blowing bubbles and popping them, because then when a nearby star goes supernova it will spare your life. You are the bubblegum, the star would think, if it had thoughts. Except none of these objects have thoughts, including the fly. You might wonder…
Flies have a role in nature, as decomposers and food/water sources for many other animals. They are a valued participant in Earths ecosystem. Houseflies only exist because we built houses around the decomposing waste that they are biologically wired to seek and consume.