Why does Oxygen act as Nucleophile over here?
You may be seeing the impact of the aromatic ring.  Putting a negative charge on carbon in your structure disrupts the aromatic coupling.  So carbanion contributions are reduced and the oxyanion contribution, where the oxygen is nucleophilic, is favored.