Well it was a terrible idea. The queen is trapped after Nxc2.
Why was this the best move?
The queen was trapped. I presume the computer considers Qe3 best given the unavoidable outcome. White can capture the knight with the f pawn, strengthening their centre and open the f file for their rook. Nice tactic by the way.

The queen was trapped. I presume the computer considers Qe3 best given the unavoidable outcome. White can capture the knight with the f pawn, strengthening their centre and open the f file for their rook. Nice tactic by the way.
Thanks. I didn't even notice the queen was trapped. Chances are I would have noticed I could capture it no matter where they moved it, but I'll never know. Making the fork with the knight was intentional (I've been on both sides of that scenario multiple times) and the bishop was there to make trouble for the queen, which we both failed to notice could have been solved by blocking with the f pawn, but then I got too focused on the knight and forgot about the bishop's threat to the queen. If losing isn't going to teach me to concentrate on the whole board, maybe winning will.
Why was it a good idea for my opponent to blunder their queen?