Not "how did it appear there", but "how to get rid of it in the most brutal way possible" is the question you should be asking. May I offer hanging it on the hook and beating it up like piñata?
I personally enjoy throwing them into the river, they can't swim even if they get up so they just float downstream and leave my render distance giving me a lot of time without worring about them, plus yeeting them into the river is funny :D