Why is moving King to Kf8 here much better than Kd8?

Sort:
4RodrigoSalazar
In this game as black, I was placed into check and I chose to move my King to d8. After the game the analysis says that Kf8 is -.3.53  and Kd8 is -0.91. I can't see why there's such a big difference, what am I missing?

Game https://www.chess.com/live/game/6193530657
 
 
 
 
 
 

 

4RodrigoSalazar

@lesnar, can I still castle if I have moved my king to avoid this check?