The same way many other names did.
"Lynch" was a name long before it was a verb. (It's not clear which Mr. Lynch gets the credit, but apparently it was a guy who went around lynching during the American Revolution, not an Irish guy who got lynched as I once learned.)
So some Lynches owned slaves, and some of those slaves wound up with the name Lynch when they were freed.