Yeah! I watched that movie recently and to be honest, I think the robot made the right choice too. Because if Will had died, only goodness knows what would have happened with the robots in the end as he played a major role in saving the world from the control of AI.
I just think it is neither a right nor wrong choice as long as it wasn't within its control to save both.
@hopestylist here!