In the real world, robots are designed from a practical standpoint: form follows function. A robot is built with a specific task in mind and is designed to be able to best perform that task. For example, it makes sense for a bomb-defusing robot to be equipped with tank treads and a manipulator arm: it's going into unstable terrain and it needs to be able to pick up and move things.
But in the world of science fiction, sometimes robots are designed from a completely different standpoint: to be as creepy-looking as possible. Sometimes a robot is designed with almost no regard to intended function. Why would you design a maintenance droid to look like a giant spider? Why does the mining robot need huge glowing red eyes? And who gave it a laser?
The reason? Drama.
Because AI is a Crapshoot, and because Technology is Evil, the machines will eventually destroy and/or replace us. And it's much scarier if the machine doing it is inheritantly creepy-looking. The creepiness can take many forms. The robot could resemble an animal that humans already have an instinctive revulsion to, like an insect or a snake. It could enter the Uncanny Valley by having a vaguely humanoid form, but with some addition (or subtraction) that makes it flat-out unsettling. Or it could have a form so completely removed from anything recognizable organic that it makes you wonder what engineer could have possible come up with it, let alone wonder WHY they did.
Whatever the form, the Unnecessarily Creepy Robot has this as its constant: it was designed to be creepy first, and then efficient second. Given what the narrative says the robot was designed to do, there is no practical reason for it to look like it does, other than to simply make a dramatic point: either that technology is unnatural and scary, or simply that seeing THIS THING coming after you is terrifying.
A good example is Hector the robot from Saturn 3
: Seven feet tall. Humanoid in form, only instead of a head it has a pair of telescoping eye stalks. Its body is covered in a network of tubes that resemble human musculature, giving it the overall appearance of a skinned, decapitated corpse. Oh, and its CPU is culture-grown human brain tissue. Its intended purpose? Farming.