Oh dear! I must start checking out both examples when there is a duplicated question. I've just answered the same thing directly above, Cetti. Still...at least we both came up with the same answer!
It was considered good fun to see people being executed, and they brought the knitting because there was always a wait before the condemned person was brought to the place of execution. I have heard that in some other countries, people who had houses with windows overlooking the gallows used to rent out standing places at their windows and were not short of customers.