That song the Muffin Man was written to teach children not to trust anyone offering them treats. The man was a serial killer that snatched children after they accepted a muffin from him.
@Bluebirdsonmyshoulder A lot of the old fairy tales are dark in nature, used to teach children lessons. I bought my daughter some Little Golden Books to read to her, some of them fairy tales. I got about halfway through Hansel& Gretel and had to stop. I threw that book away.