the system is wrong
I am confusion

in the second one, after you play Bxf7+, Kxf7 and then Qd5+ to gain back material. In the second one you can't play Qd5 immediately, because then they go Nd6 and defend.

In the first one, Bxf7+ is bad because you can't gain material or attack the king, because you can't get the queen out or fork since the knight is on f6 and does a great job defending

you're not confusion, you're breakfast.
i'm going to guess that the difference goes back to the adage that 'it depends on the position'. have you tried bxf7 in practice in both scenarios?
you can see my rating, and i'm not very good, but it seems obvious to me that bxf7 loses the bishop and black can easily defend on the first board. on the second, white can continue to attack after kxf7. just go through a few moves and you should see it.


General rule is: When a knight is defending/sitting on King-side, it is bad to Sacrifice a Bishop.
Knights are generally considered as best Defenders. In position 1 knight is sitting there, In position 2 Knight is not on K-side.
But there is no specific principle for a sacrifice, it varies position to position.
In this position, Bxf7+ is considered a bad move.
...But here, it's apparently the best move.
Am I dumb? What is the difference?