I'd love to hear from someone that knows but afaik most things Kosher derive from ancient food safety where provenance was also part of safety.
There were some alleged cultist/idolatry practices involving wine that would cause it to become non kosher so it’s easier to just blanket ban anything handled by a goy. I think boiling makes it unusable for those same rituals.
It’s also to discourage fraternising (especially romantically) with goyim.