The Kerkopes started laughing because they remembered their mother had warned them against the black-bottomed one. After explaining their laughter to Hercules, he joined in and, being the good sport that he usually was, released them.
Eventually, the Kekropes were transformed -- turned either to stone or to monkeys. [See other stories of metamorphoses.]
According to "Herakles' Attributes and Their Appropriation by Eros," by Susan Woodford. The Journal of Hellenic Studies, Vol. 109, (1989), pp. 200-204, Nonnus is the most complete source on this odd story, which is known mostly through late sources, but may have been known by Homer. The same article says the Kerkopes are one of three groups of creatures associated with stealing Hercules' weapons while his attention is elsewhere. The other two are satyrs and Aegipans (Aigipans).