Wall E never explains how robots, such as WALL•E and EVE, gained personalities, or why some do and some don't. It's probably better that way. WALL•E is actually insane in a good way. 700 years with no-one to interact with but a cockroach will do that. Essentially, all the character robots in the movie develop personality and emotion when they step outside of their primary directives. For some like M-O, this is a fairly short and abrupt step when he chooses to ignore the path he should be following in order to do something he wants to do (i.e. he gets annoyed enough to break a rule). For others like EVE, this is a more subtle development. Even the misfit robots in the robot infirmary aren't all depicted as insane — some just don't behave within their intended function. Of course, that raises the question of why they were programmed to be able to make decisions like that.
The title character in The Iron Giant. No explanation why it has a humanoid form, or why it can emulate human behavior so well.
Partly justified with Baymax in Big Hero 6, as he was built specifically for human interaction. He is more robot-like than some of the other examples, such as when Hiro falls and has his action figures fall on him one by one, with Baymax going into his standard "on the scale of 1 to 10, how much does it hurt?" routine every single time Hiro says "Ow" instead of keeping the rest from falling. While he has a head, two arms, and two legs, he is also clearly inflated, which is supposed to put patients at ease (he is a nursing bot). He clearly has the capacity to learn beyond Hiro adding karate knowledge on a chip, such as learning to fist-bump. When he recognizes that his medical knowledge is insufficient to help Hiro's emotional pain, he downloads a psychiatric database. After Hiro removes his Morality Chip in anger to kill the Big Bad, Baymax locks the access port to prevent Hiro from doing it again, as such behavior is contrary to his purpose. At the end, Baymax performs a Heroic Sacrifice to save Hiro and Abigail in an I Cannot Self-Terminate moment, although he leaves his personality chip with Hiro, so he could be rebuilt. Strangely, when low on power, he behaves like a drunk person, possibly because he lacks power for processing (leading to slurred speech and random behavior) and proper motor control (leading to stumbling and falling over).
The Terminators from the titular movies are made of human skin stretched over a robotic skeleton. As robots that are meant to infiltrate human camps and slaughter them from inside, the only thing that seems to tell them from a normal human is their Nigh-Invulnerability; putting that aside, they look, smell, sweat, bleed and walk like an actual human. Dogs, however, aren't fooled.
Ridiculously Human AI was avoided in Sunshine. Although, like HAL, the computer can respond to natural-language commands and has a creepily calm voice, it has no internal mental life to speak of and therefore doesn't anticipate or adapt to problems outside its original mission profile. If you've ever tried to wrestle a computer program into doing something beyond its basic functions, you'll see how accurate this is.
It is, however, a plot point in 2001: A Space Odyssey, in which HAL becomes paranoid and psychotic after being given conflicting commands of equal importance. (At least, that is explanation offered outside of the film for his actions.)
The problems inherent in programming ridiculously human robots is explored in A.I.: Artificial Intelligence, in which the robot David is programmed with genuine love, rather than the simulated love of previous models (like Gigolo Joe). This leads to a Pinocchio-like plot later on.
The droids in Star Wars. The Expanded Universe takes this further with "Human Replica Droids" such as Shadows of the Empire's Guri. It takes special equipment to recognize that they aren't human. As for "regular" droids it is worth mentioning that most of them aren't programmed for personality, emotion, or human behavior. Some, like the most commonly known R2-D2 and C-3PO, develop those traits. Others don't.
The intelligent bombs of Dark Star, most notably Bomb No. 20.
Starchaser: the Legend of Orin is a huge example of this trope, as its various robot characters express just about every emotion that could possibly come up in an animated action b-movie (sarcasm, hysteria, cheering, evil laughter, frustration, indignation about being reprogrammed through circuits located in their metal asses, getting seduced by feminine robots, and so on).
Johnny Five from Short Circuit gains sentience and self-awareness after being struck with lightning. Then, after a whole night of feeding on input (reading every book in Stephanie's house, and watching TV all the while) he grows a playful, childlike personality that is filled with wonder at the world around him. Most impressive of all, he develops his own set of morals without ever being told, going as far as to reject his original purpose as a war machine and refusing to "disassemble" any other living thing (or, indeed, other robots) even when his own existence is at stake.
As Nick says in Cavemen: "Cheesy?! What exactly is cheesy about a wise-cracking robot with a heart of gold fighting the military-industrial complex?"
The notorious Andy Kaufman-Bernadette Peters comedy Heartbeeps (1981), about a pair of robots who fall in love with each other, goes to town with this concept.
In the Alien movies, the androidsScience Officer Ash, Bishop, and Analee Call all pass for human until they're "bleeding" a milk-colored Symbolic Blood. The last of those three in particular conveys so much emotion that nobody ever would've suspected she was an android. This is because she is supposedly a next-generation android that is illegally built by other androids and has to live in secrecy for fear of being discovered. Ripley even berates herself for not having realized that Annalee Call was a synthetic, claiming that this very trope should've clued her in in regards to the fact.
Prometheus: David's exploration of how human he really IS forms the heart of his character: though he's not supposed to be capable of actually feeling emotion, he certainly seems driven by something more than mere programming, namely a desire for acceptance and a sense of plain curiosity.
In Westworld (and its sequel, Futureworld), the robots are ridiculously human precisely because they're supposed to entertain the human Guests. Some robots are even "sex models" for people who want to swing that way. Of course, A.I. is a Crapshoot...
In Halloween III: Season of the Witch, most of the Mooks are actually this as is the version of Ellie that our hero escapes from the factory with, and which tries to kill him. Some believe she was actually a robot all along, including when she had sex with him.
The photonic library computer from the 2002 film adaptation of The Time Machine. The computer even gets visibly irritated at what he regards as stupid questions from the Time Traveler, when a real computer would simply and happily attempt to answer any of his inquiries regardless of what was asked. This means that for whatever reason creators gave him the same flaws as a human librarian would have, even though there was no reason for it and would actually hinder his performance as a library computer.
Creation Of The Humanoids combines this with an inversion of Transhuman Treachery to create a scenario where the despised robots, which are deliberately kept from becoming too human, conspire with a human scientist to create a new race of immortal human-replicating robots into which human personalities are downloaded at the time of the original human's death. The protagonist is the leader of the anti-robot movement, and it turns out that both he and the love interest he develops during the film have already been through the process.
In Wrongfully Accused, Leslie Nielsen's character sneaks into a hospital's computer room Mission: Impossible-style and discovers that the computer is, for some reason, Jewish (even the laser grid is in the shape of the Star of David, and it says "Shalom" when turned on). It immediately starts making Jewish jokes and then gets annoyed when the protagonist just wants him to print the records. It then fills the room with print-outs.
In Ex Machina, Nathan's goal is to create robots based on Ava that could pass as human if they were made to look like people. Ava walks and moves in a lifelike manner, and has been obsessively designed to read and express emotions naturally with her face and body. Kyoko actually manages to fool Caleb, although she apparently cannot speak. Nathan justifies this as a necessity. An A.I. with no form or one merely designed for practicality (a box, for example) would have no reason to relate to a human.
Ultron in Avengers: Age of Ultron. He was originally designed without a body, being intended to act as the intelligence guiding the Iron Legion and enough Mecha Mooks to protect the world, but the first thing he does is build a body for himself. It's a very human body, and both Bruce and Tony point out that this doesn't really make sense, as the human form isn't very efficient in most cases. Personality wise he is also excessively human, being a snarky joker who is nonetheless brilliant. In fact, he's basically an exact copy of Tony, just with less experience and morals.
In the cheesy sci-fi movie R.O.T.O.R., the titular killer police robot sports a potbelly and a mustache. Meanwhile, the robot comic relief Willard sighs, moans, and even asks for his co-worker's french fries.
In Pixels, Michael looks like a regular human, apart from circutry sticking out of the back of his head, while all in all, he's a glorified lab assistant and secretary.