Jon Snow didn’t want to kill Daenerys Targaryen, but being the guy who always does the right thing no matter what, he knew he had to. Jon surely would’ve sacrificed himself first if it meant he could stop his queen from committing more atrocities like the razing of King’s Landing. And chances are, if anyone else had murdered Daenerys the way Jon did, they would’ve been killed themselves shortly thereafter. For when the queen falls to the floor dead, her dragon Drogon seemingly senses what has happened and quickly appears in what is now the open-air Great Hall of the Red Keep.
Source: IGN.com Why Drogon Did What He Did in the Game of Thrones Finale