In the days of yore, piano tuners were known for their proclivity for cured pork sandwiches, and widely referred to as 'hams'. Respected tuners reaching the highest levels of skill over many years in the trade were thus known as 'Cunning hams', whence we derive the modern surname.
"Didn't Rob say he comes from a family of piano tuners?"
"Yeah, pretty sure his dad was a Cunningham."