I am a beginner. Recently I have looked at the computer-generated analysis of one of my games and I found a surprising recommendation. Why is it best to sacrifice my Queen in this situation, as the screenshot shows?
[FEN ""] [StartPly "10"] 1. e4 e5 2. Qf3 c6 3. Bxc4 Nf6 4. d3 d6 5. Bg5 Bg4