For example, in the given image, I have starred the step where the relatively unstable resonating structure proceeds forward in the reaction.
Chemistry Stack Exchange is a question and answer site for scientists, academics, teachers, and students in the field of chemistry. It only takes a minute to sign up.Sign up to join this community
Imagine a case where the resonance form with the negative charge localized on the oxygen went forward and attacked the second carbonyl: That charge needs to go somewhere so the double bond is broken and the electrons go up to the second oxygen (the one that started as the second carbonyl). Those electrons would look to come back and reform the double bond, and in doing so would force one of the groups to leave. And the bond that leaves is the one you just made. This reaction happens with both atoms acting as a nucleophile except only one (the carbanion) goes forward and doesn't immediately leave again.