In the end of the epic fight scene with Ultron robots run and fly away from Hulk like they have emotions and fear. Their goal is to get to the drill, isn't it? Why did they behave like people?
as TheLethalCarrot suggested, it was a tactical retreat keep Ultron alive. After he was born and the Avengers questions his allegiance, Vision explained how even Ultron's forms had to be destroyed
Vision: What will you do? [he looks at them all realizing they will destroy him] I don't want to kill Ultron. He's unique, and he's in pain. But that pain will roll over the earth, so he must be destroyed. Every form he's built, every trace of his presence on the net, we have to act now. And not one of us can do it without the others. Maybe I am a monster. I don't think I'd know if I were one. I'm not what you are, and not what you intended. So there may be no way to make you trust me. But we need to go. [he holds up Thor's hammer and hands it to him, Vision walks off and everyone stares in shock]
Vision had already cut off Ultron's access to the Internet so he could not escape to there. after effectively destroying his Vibranium body Ultron knew he was about to be killed since the drones aren't string and the Avengers have been tearing them apart, so he would have then ordered the drones to flee since Ultron can live in any one of them. we know at least one got away but Vision ultimately took care of that one
"But what about the Vibranium body? Hulk just punched it, it wasn't destroyed!"
yeh but Tony, Vision and Thor would not have stopped attacking if it wasn't on the brink and considering how hard Hulk can punch it unlikely to function at all. even if the Vibranium body could after that kind of impact given how damaged it was already it's not surviving the fall. the fact the the drones began to flee is another sign that the Vibranium body was finished