They expected immediate collapse of Ukrainian army because this was what happened in 2014. Well, it did not happen this time because Ukraine had 8 years to prepare and prepare they did.
I was actually slightly surprised that they actually went for Kyiv instead of trying to just take Donbas with all they got there. All the military experts who commented the situation before the invasion told that it would be not realistic to take Ukraine with forces this small.
They thought that they will just go to beat up some women and children without any resistance but they were wrong. Corruption, hubris and stupidity kills in war.
This kinda explains why the first wave of Russian soldiers were naive enough to stop in the city and ask common people for directions to the city center.