Ukranian : Probably thought they are in safe area and assume enemy tank wouldn't come that close. So, they though that Tank is captured.
Russian : Seem to went too deep into frontline. Probably assume Unkranian try to surrender when they are not disperse after Tank approach from distance. Given that situation, thier only choice is to open fire. They can't just back out or go past them.
Seem this kind of situation are common than we saw. There also Russian scout who manage to capture Tank by loose their camo uniform and get in close.
PS. Round probably go right through some of those troops. Pretty sure I saw pink mist...
This seem to be confirmed in a way.
There are aftermath of this (very gory...). Seem like Ukranian troops knock out Russian BMP and gathering around it for something. Meanwhile Russian tank probably spot troops gather around vehicle with "V" mark in distance and come to offer assistance because probably though those are friendly troops that help to move that BMP.
After they came in close contact, Russian seem to realized it first and open fire. As for the rest...
As for the reason why Ukranian troops didn't disperse, the tank might be captured or have IFF mark on the side.