[FEN "3k3r/pp1n2R1/2p1bp1p/6p1/2PP1p2/1PBB3P/P4KP1/8 w KQkq - 0 1"] 1.d5 cxd5 2.cxd5 Bxd5 3.Bf5 Nb6 4.Bxf6+ Ke8 5.Bg6+ Kf8 6.Re7 Bc6 7.Rf7+ Kg8
I was using Stockfish/Lichess to analyze 1.d5 cxd5 2.cxd5 Bxd5 3.Bf5 Nb6 (a very silly try to avoid immediate material loss) 4.Bxf6+ Ke8 5.Bg6+ Kf8 6.Re7 Bc6 7.Rf7+ Kg8. I always played out the preferred computer move after a second or two, which lead to the computer repeating moves a few times, trying e.g. Rg7+ followed by Rf7+ or Rc7 first (where I simply would have gobbled the exchange).
This behavior is straight impossible (by game theory) for a "god" computer. My only half-baked explanation is that the computer acts exactly like a human: hey, there must be some mate, let's repeat moves to gain time for analyzing a bit deeper. (But the analysis mode of Lichess doesn't involve time anyway?!)
Can a computer expert tell me why a computer repeats moves in a won position?