St. Petersburg was a German-sounding name at a time when Russia was at war with Germany. The Tsarist government renamed the city Petrograd during WWI. The result was an awareness of the foreign heritage of the city and the ability to change names. One of the ways the Bolsheviks presented themselves to the population was as a more patriotic force than the Germanic/French-influenced aristocracy. TSARitsin was named after an institution the Bolsheviks wanted to change.
Renaming a city whose name was associated with foreigners was a way to show the Bolsheviks were patriotic (they may not have believed in patriotism but it was useful). Renaming a city whose name belonged to institutions the Bolsheviks wanted to destroy was a way to show the old way of life was not coming back.
Renaming Moscow would have reduced the emotional implications of moving the government back to the traditionalist heart of the country and wiped out much of the tolerance traditionalist Russians had for the new government.