Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bb5/3...f5/4. Nc3/4...fxe4/5. Nxe4/5...Nf6/6. Qe2/6...d5/7. Nxf6

It's check, and 7...gxf6 is necessary to regain the piece. 7...Qxf6 would be a bad way to sacrifice the e-pawn because White wouldn't be forced to give up the bishop pair in order to capture it (as she would after 6.Nxf6+ Qxf6 7.Qe2 Be7).