“fly” is a noun (meaning small flying insect). When you kill a fly, you reduce the number of flies by one.
“on the other hand” is expressing a contrast with the first sentence. The first sentence is suggesting that killing flies is bad; the second sentence is suggesting that reducing the number of flies is a good thing. The effect is slightly humorous.