One thing you should always do in Russia is to carry an identification document. As a foreigner, one should carry the passport with valid visa on it. Diplomats carry their ID cards issued by the Russian MFA.
Random checks by police are not uncommon, especially in Moscow. If you don’t have your identification document with you when stopped by the police, serious trouble awaits you.
About 15 years ago, even Russians, who were not registered in Moscow, were not allowed to live in Moscow for long duration. Russian visitors to Moscow used to carry their train tickets with them to prove that they are on a temporary visit to Moscow.
Talking about strictness in Russia about carrying identification documents, I am reminded of an incident that occurred when I was posted in Moscow in 2001. During the first bilateral visit of then Indian PM Atal Bihari Vajpayee to Russia, then External Affairs Minister (EAM) Jaswant Singh forgot to carry the identity pin issued by the Russian Protocol. The security at the Kremlin stopped him at the gate and would not let him enter. The security was told about the identity of EAM. However, he did not budge and said that his instructions were not to let anyone through without proper identification. The matter was resolved after some uncomfortable minutes till instructions came down from higher up to the security.
In fact, there is a saying in Russian, ‘If you do not have a paper on you, you are as good as garbage (the actual Russian word has a worse meaning).’