I played this game recently as white: https://lichess.org/b7B16RLF/white#18
[FEN ""]
1. e4 e5 2. Nf3 Nc6 3. Bb5 Nf6 4. d3 Bc5 5. Be3 Bxe3 6. fxe3 d6 7. d4 Bd7 8. Nc3 O-O 9. Qe2 a6 10. Ba4 h6 11. O-O-O Qe7 12. h3 b5 13. Bb3 Rab8 14. g4 h5 15. g5 Nh7 16. Rdg1 Ra8 17. Nd5 Qd8 18. Qg2 f6 19. gxf6 Nxf6 20. Qxg7# 1-0
On move 10 I played Ba4 to protect my Bishop from the attacking a file pawn while continuing to target the black knight on c6. But according to Stockfish, this is an inaccuracy and that the best move is Bd3.
I want to understand why.