You don't understand puzzle logic. Just as in a game your opponent does not always play the best moves. Which is OK as only YOU have the duty to play winning moves. The top engine moves for your opponent may be objectively better but he may play anything to get you off the scent. Which your puzzle opponent did here. This is actually the same as what any player should do. Instead of playing the boringly losing Qg2 move, (though it takes a long fight) a player shows courage to risk Qxd3 which sends the message: PROVE IT! And it was successful - against YOU.
Besides this human argument there may also be a technical puzzle argument. The puzzle playout must assure there is only one superior move for YOU at every turn - or the puzzle would be unsolvable. So it chooses its replies only among the options which leave you that one superior follow-up move - which permits the puzzle to continue for a while.
Remember that for your game play but also when solving chess puzzles elsewhere. The counterplay is picked to trip up an opponent in positions which are objectively lost anyway.
https://www.chess.com/puzzles/problem/1879968
29. Qxd3 is not even in the top 3 moves and caused me to "miss" the puzzle because I had calculated based on the real best move, 29.Qg2.