Well, in the Rumpelstiltskin story, there's a clear moral about the power of names. Rumpelstiltskin is so confident that no one will ever guess his name that he makes this bet with the girl. When she finally discovers his name, it shows that names hold power. It also implies that knowledge, in this case knowing someone's name, can be a form of power. And overall, it's a cautionary tale about getting involved in things beyond your control because of lies and desperation.