Trying to figure out why the engine suggested this move I don't quite understand this. I like playing chess, and I'm working to improve, but I still am likely very much a novice.

Anyway, I played a game where I won in 9 moves, but I'm curious why the engine suggested the "best move" it did.

My game was as follows (I was playing as white):

[fen ""]

1. e4 e5 2. d4 Nf6 3. dxe5 Nxe4 4. Qe2 Bb4+ 5. c3 Bc5 6. Qxe4 O-O 7. Be3 b6 8. Bd3 Bb7 9. Qxh7#


The engine suggested during analysis that a better move than Bd3 (move 8) was Qxa8.

I acknowledge I still have much to learn about the game, strategy, etc. But I'm curious why this is the better move. After Bd3 I'm easily set up for a checkmate if the opponent doesn't do g6.

Does Qxa8 set up something I don't realize? Am I missing a line? What's going on there?
On my quad-core running Stockfish 10, the evals are very close, but Bd3 is preferred, and to me, I agree since you develop a piece with tempo, black defends the mate, and then you still take on a8 winning.

It is really about the same, but Bd3 is slightly better on my engine.

Basically, your intuition is right, and maybe your engine or computer are not as strong...or maybe even mine is not.