Director Andrew Stanton explained why he used excerpts from Hello, Dolly! in an interview:
"When I got to ‘Hello, Dolly!’ and I played ‘Put on Your Sunday Clothes’, and that first phrase ‘Out there…’ came out, it just fit musically… I finally realized, ‘You know what, this song is about two guys that are just so naive, they’ve never left a small town, and they just wanna go out in the big city for one night and kiss a girl. That’s my main character.’ And then my co-writer, Jim Reardon, said, ‘You know what, he could actually discover an old tape in the trash, and that’s how he got inspired by it, and it’s a great way to show that he’s got a romantic slant.’ So we started looking at the movie, and when I found the other song, ‘It Only Takes a Moment’, and saw the two lovers holding hands, I realized, ‘That’s a perfect way for my main character to express the phrase ‘I love you’ without being able to say it.’"
The vacuuming robot that follows WALL-E and EVE has a robotic version of the song “Put On Your Sunday Clothes” (from the “Hello, Dolly!”). It’s the first two lines of the song’s chorus in electronic form. Stanton came up with the idea of using ‘Put on Your Sunday Clothes’ from “Hello, Dolly!” as he had portrayed Barnaby Tucker in a 1980 high school production. Hello, Dolly! composer Jerry Herman allowed his songs to be used in the film without fully realizing how or why. When he saw how they worked in the film, he claimed it was “genius”.