Being a practical man, he viewed them as tools to be used and replaced when they no longer functioned. He could have recognized C-3PO as a tool from his past, but showed no outward signs of remembering him because he thought it unessential.
When the OT was first released, Vader/Anakin had never been a slave boy on Tatooine, had never built C3PO, and never owned R2D2. Hence he didn't have any affect with either in the movies. There are most likely millions of 3PO droids across the Galaxy, we see several during the films. the same with the 2D2 droids.
Obi-Wan did in fact remember R2D2 after the little smirk he gave after seeing him in ANH when he rescued Luke from the sand people. C3PO had his memory erased so he doesn't remember at all. And I agree with the above statement about Obi-Wan and R2 having an off set agreement about there friendship.
Original trilogy
The droids then escape in a pod that crashes on Tatooine near Jedi Master Obi-Wan Kenobi's (Alec Guinness) desert abode. R2-D2 and C-3PO are then abducted by Jawas and bought by Owen (Phil Brown) and Beru Lars (Shelagh Fraser), uncle and aunt of Luke Skywalker (Mark Hamill).
Obi-Wan greets R2-D2 and later recalls “not owning a droid.” Obi-Wan purposely withheld information from Luke in order to keep Luke from straying away. This could offer an explanation as to why he appears to not know who R2-D2 is. Further in Empire Strikes Back, neither Yoda nor Darth Vader recognizes either droid.
Wait, STAR WARS Stars Anthony Daniels (C-3PO) and Kenny Baker (R2-D2) Hated Each Other!? I recently just found out something about Star Wars actors Anthony Daniels and Kenny Baker that I never knew before. It turns out that these two actors who played the lovable droid characters of C-3PO and R2-D2 hated each other.
It was easy to believe that Darth Vader had kind intentions or a simple code of honor for the Sith, but his plans were much more strategic. Instead, Darth Vader wanted to keep Chewbacca alive because he wanted the Rebels to collectively suffer even more. He wanted them to be weak.
His memory was wiped at the end of Revenge of the Sith. A blabbermouth like him can't be trusted with sensitive information.
In Death Star, it seems the Sith Lord could have discovered Leia's true identity if he'd pursued his hunch. However, Leia's strong-mindedness during Vader's probe denied him the opportunity to discover she was his daughter.
Yoda recognized R2-D2 during The Empire Strikes Back.
R2-D2 was present when Padmé gave birth to Leia and Luke, so he knew Luke was Anakin's son – but what he didn't know was that Anakin became Darth Vader. In addition to that, Anakin's fall was surely a painful event in R2-D2's life, one that he definitely wouldn't like to remember or even talk about.
Theory 1: Leia Doesn't Remember Ben Is Obi-Wan
Throughout her encounters with Kenobi in the series, he refers to himself as Ben. The most straightforward explanation would be that Leia knows the person who rescued her is Ben, and never connected the dots that Ben is actually Obi-Wan.
Vader relies on the complex life support system of his suit to survive and it happens to be very vulnerable to electrical discharges. So, if Vader ever had unleashed Force lightning, there's a good chance it would've caused his suit to short circuit, thus, killing him.
Yes, he remembers everything about his past (just not based on reality), but he probably doesn't spend a lot of time thinking about it, and when he does, his memory of things is clouded and twisted by the lies of the sith, the dark side, and his own flawed thinking and character.
After the battle, R2-D2 and C-3PO were the sole witnesses to the marriage of Anakin Skywalker and Padmé Amidala in Lake Country. After this Padmé gave ownership of R2 to Anakin while she kept 3PO.
Darth Vader didn't learn he had a daughter until Return of the Jedi, when he stood before Emperor Palpatine. The Emperor's power probed Luke's mind, attempting to goad him to fall to the dark side, and he discovered Leia's existence. "Sister," the Emperor taunted.
R2-D2 was in on the scheme to keep the secret away from Luke and Leia. He was devoted to the Skywalker family, and at the guidance of Obi-wan and Yoda, he would have maintained that secret in order to help protect the twins.
Of those he worked with Boba Fett was the one known for getting the best results, that is, unless you didn't want your opponents to be disintegrated. The two men shared a begrudging respect for one another that Boba was unaware had begun several years before when Darth Vader was still known as Anakin Skywalker.
Grand Master Yoda encountered the specter of Darth Bane during the Clone Wars. During the war, in 19 BBY, Jedi Grand Master Yoda ventured to Moraband on a journey to discover the secrets of immortality. He entered Bane's tomb and encountered a fiery vision of the ancient Dark Lord.
Yes, Chewbacca knew Obi-Wan Kenobi. They were friends and allies in the Rebel Alliance during the Galactic Civil War.
Obi-Wan Only Says He Never Owned R2
Note that he says nothing about not recognizing R2; his clever dodge gives the impression that they're strangers but doesn't actually deny knowing the little astromech. Thus, there really isn't a "contradiction" in the first place—Obi-Wan was just being his cunning self.
He is a total liability
Not only does C-3PO contribute nothing, but he often serves as a literal burden to his allies. He gets lost and falls over constantly, executing enough pratfalls and flailing to give even Jar Jar Binks a run for his money – and to similarly-questionable comedic effect.
C-3PO accidentally became part of the Battle of Geonosis when his head was affixed on top of a battle droid's body after a mishap in the Geonosian droid factory. R2-D2 and C-3PO witnessed the secret wedding between Anakin Skywalker and Padmé Amidala on Naboo.