Zhu Gekongming was besieged by Sima Yi in Pingyang and could not send troops out of the city for help. Kong Ming calculated the wind direction, made a floating paper lantern, tied with the message for help, and then escaped as expected, so later generations called this lantern Kong Ming Lantern. Another way of saying this is that this lantern looks like a hat worn by Zhu Gekongming, hence its name.
The saying of wishing lamp is pure superstition, which is a major drawback of China folk tradition. The most common application of China's four great inventions is superstition, such as papermaking, gunpowder, burning paper produced by compass, firecrackers, geomantic omen and so on.
Religion itself has nothing to do with superstition (religion has the obligation to oppose superstition), but at present, some religions in China allow and even encourage these superstitions in order to do as the Romans do, and even for the benefit (Islam and Christianity usually oppose these superstitious customs and religions, and Christianity is hated by other religions and some people with "traditional ideas")