Question: How did teddy the get extra hair? They left the room where David cut his mother's hair, and never returned. Second, how did teddy think to get the extra hair? They didn't know about DNA cloning until near the end of the film.
Question: Why did the tech company that manufactured David stay based in Manhattan? Considering that it's flooded. Seems a little impractical.
Answer: The owner/inventor of the company may have kept the doors open in Manhattan to see if any of his products would return 'home'. He seemed to be very pleased that David had returned and was interested in finding out why. I got the feeling the AI's creator was hoping for a sign that the instinct to return was something novel and not just a predictable result of their original programming.
Question: So, what happens to David and Teddy after the movie is over? Wouldn't they be alone on Earth after David's mother dies again?
Answer: It is implied that David dies after spending the day with Monica. The narrator says that he falls asleep and goes to "that place where dreams are born" which could be interpreted to mean the afterlife. Teddy's fate is never mentioned. However, the words of the narrator could also be interpreted literally, and David simply falls asleep and has a dream. It's up to the viewer to decide how they view the ending.
Answer: This is answered in the film. After David cuts his mom's hair and the parents react, David is frightened and the hair falls to the floor right in front of Teddy. Teddy, who wants to help David, picks up the hair, knowing David wanted it.