Why does the OAc group leave in the first step of Oxymercuration?

![enter image description here](https://i.stack.imgur.com/GvVIs.png)


The above picture shows the first step of Oxymercuration. The electrons attack the Mercury atom but the OAc group leaves. Why is this? Hg is a transition metal with a number of available oxidation states, why cant it just accept the electrons? For similar reactions (like glycol cleavage using periodate or lead tetra acetate) how is it possible to tell whether a group will leave (retaining oxidation number) or the oxidation state changes?


