THIS IS LENGHTLY, BARE WITH ME- Wands take on and imbibe the characteristics of their masters. Since Harry has a piece of Voldemort's soul inside him, Harry and Voldemort's wand mimicked the relationship b/w
the two. Bc of the connection between the two wizards, that night in the graveyard, Harry's wand absorbed some of the powers and qualities of Voldies wand(mimicking the relationship bc since Harry has part of Voldies soul,
, his wand-taking on the characteristics of it's master-absorbed the powers of Voldies wand like how, theoretically, Harry "absorbed" part of Voldies soul. The same thing happened to Harry's wand as it did to Harry himself.
The wands were able to do this bc they share the same core. So, when Voldie pursued Harry that night of the 7 Potters, Harry's wand recognized Voldemort( an enemy) and since it absorbed Voldies powers earlier, it acted on it's own to protect Harry by shooting the golden flames. The flames being Voldies powers that harry's wand now posses. Also, Harry's courage helped create the powerful flames