Two sources are offered for this ruling. A second approach, which Pnei Yehoshua and other later commentaries put forward, is that Rabbi Chisda understood Rabbi Yochanan's ruling to apply only to matters of eating. Rabbi Yosef, of course, takes issue with this. He contends that even in non-food matters, there is still a prohibition even in the most minute amount. Whatever Hashem created in this world, declared Rabbi Yehuda, was created for a purpose.
Nothing is superfluous.
This observation was directed at those who see insects and reptiles as not only of no benefit, but even as harmful. Rabbi Yehuda, in our gemara, points out how some of these harmful creatures can be used to supply healing for damage caused to man by other creatures. Another approach suggested by the Midrash is that sometimes the harmful creatures serve the purpose of punishing the wicked who deserve the damage inflicted upon them. The classic example is the case of the Roman Emperor Titus who defiled and destroyed the Beis Hamikdash in Jerusalem, and returned to Rome on a ship loaded with the sacred vessels he had looted from it. Hashem's response was that He would send the tiniest of His creatures to battle Titus on land.