There is a very old blog post about how surnames were created. This blog post describes that sometimes the person received a surname which was funny because of his appearance or behaviour.
And there are surnames which were considered funny those days - and they still exist until today and still are funny. Here are some examples of such surnames - and I hope you'll have fun reading the explanation.