Why is exposing my queen for capture better in this position (According to computer analysis)? In one my of my game, the following position appeared (me white):

Computer analysis says that I should have played Nf3 (exposing my queen being captured by the bishop). In the proposed scenario by the computer, the opponent will play h3 (capturing my knight) and so I can capture his bishop with my queen.

But another scenario could occur, the opponent will capture my queen with the bishop and I can then play Nf7 (something like the fried liver) and the opponent moves his queen and I can capture the rook (Or he can capture my queen and I capture the bishop with the rook but in this case he can then move his queen to prevent the somewhat-similar-to fried liver attack). But In such case, I think the opponent is in a better situation: He got my queen and I got a pawn and a rook (or a pawn and a bishop), He can no more castle but he has much more material so he can do well.

So why does the computer says that this is a better move? I tried h3 to attach the opponent bishops but computer says this is not a good move!

An explanation for why such an analysis is valid is highly appreciated
Your description of the computer's suggestions doesn't quite match the position, but if you mean the computer suggests Nxe5, that is correct, as Bxd1 leads to a variation of Legal's Mate.


Nxe5  Bxd1
Bxf7+ Ke7
Nd5#


If, instead,


Nxe5 dxe5
Qxg4


and white has won a pawn, and has a big lead in development.