Several theories exist but certainly no one knows for sure. One of the most popular theories is that King William of Great Britain was saved by a chimney sweep after almost being killed by a runaway horse carriage.
Another theory is that a chimney sweep was working one day (timeframe unknown) and almost fell from a roof. While hanging from a gutter, about to fall to his doom, a woman inside of the house saw him and pulled him inside saving his life. After the near death experience, the two fell instantly in love and were married.
It is still a popular tradition in Great Brittian for a chimney sweep to attend a couples wedding as a sign of good luck!