The Torah describes the second plague leveled against Egypt as the plague of frog (singular), not frogs (8:2). The Midrash explains that it started with one frog, and when the Egyptians hit it, the frog split into two, and those two also split when hit, and so on. Why wouldn’t G-d just create a swarm of frogs as He does later with other plagues?
Rabbi Yochanan Zweig explains that the frogs multiplied as a direct response to the Egyptians’ evil acts of hitting the frogs, demonstrating to the Egyptians that there are consequences to their choices and actions. It is their cruel treatment of the Jews and the excessive hardship imposed on them that precisely precipitated this punishment, or the second plague as we have come to know it. The Egyptians may not have learned the lesson of compassion, certainly not by the second plague. We should strive to approach life with understanding and compassion, even if those around us may not.