The knight at c6 is in danger of getting pinned to the rook at a8.
In this situation,why is Ra7 the best?

The knight at c6 is in danger of getting pinned to the rook at a8.

The difference in evaluations between moves are actually insignificant. It's better to play a line which you are confident in than to play a computerish winning line which requires immense brain power.
I would play any other move like Be6.
It is black's turn.The computer think Ra7 is best.Can you tell me why?