They put a lot of work into the control algorithms that allow the robots to move. From a control theory perspective, being hit is a disturbance that the control system is able to reject to maintain the intended pose/motion.
It also shows the strength of the hardware. Unitree sells the hardware so it's a hardware demo as much as a software one.
You have to make sure that robots know their place. Today you treat them too gently, tomorrow you have a robot uprising destroying the whole humanity on your hands.
Haven't the last century of sci-fi books and movies taught you this?
Because that's what you'll do when you have a bad day, and this piece of trash gets stuck for the 5th time this week.