Is it wise to resign a game if the win is only apparent too many moves ahead? I will clarify my question with an example:

A grandmaster plays a game against stockfish, with a material handicap for stockfish, and the advantage is not clear for either of the players. Throughout the game, the position is a dead draw. However, during the endgame, stockfish discovers a loss 50 moves later (100 ply). For the game, stockfish was set to resign the game if the evaluation of the opponent's position exceeds 900 centipawns for 5 moves (2 ply). Consequently, stockfish resigns the game.

Was this a wise decision? What if the human blundered? Did stockfish resign a game which probably could've been drawn?
The time to resign is when think your opponent will win.  Against a beginner, I would never resign, because they will most probably blunder and lose.  Against a decent club player, I could resign after being a rook down in a lost position.  Against a GM, I would resign after the 12th move if I thought I had a bad position (it's a good learning possibility to see the technique).  

I find it insulting to not resign when your opponent has a won game. (An exception can be made for cases like checkmating with a knight and bishop).

In the case of a computer, it can only do as it's programmed to do.  (Although humans now stop the game when an endgame database position has been reached to prevent the human from making a mistake the the computer looks up in a book.  This is cheating if a human did it, why not the computer?)  I don't think that the computer should resign this early, but he late should the computer resign?