Why boil octopus with wine cork?
The muscle fibers of octopus are very thin compared to other species, arranged in multiple layers and alternating rings, which are then even further reinforced with collagen, 3-5 times more than regular fish muscle fiber. It's basically the reinforced concrete in the world of muscle fibers.

There are exactly two ways to get tender octopus:


Destroy the collagen by force or to cook it for a very long time like a stew
Barely cook it to a core temperature of not more than 130-135°F/55-57°C. At 140°/60° temperature the collagen layers will contract and you are screwed.


Note that these two methods generate edible octopus, but with different texture.

The wine cork serves no purpose. If it has any effect at all, it will negatively affect the destruction of the collagen, as tannin is actually used to cross-link, a process to make the collagen stable and durable, which is the complete opposite of what you want, when you want tender octopus.

References:
[1]: On Food and Cooking
[2]: Stabilization of Collagen by Its Interaction with Tannin
[3]: Tannin used for the conservation of leather by stabilizing collagen

As an unrelated side note, octopus and squids have the least flavorful flesh of all fish and molluscs, as they use Trimethylamine N-oxide for osmotic balance; which happens to be completely tasteless. Other species use tasty amino acids. Unless you happen to have one as free by-catch on your own fisherboat, there is not much reason to invest the time and costs to make a dish out of it.