Well, the reason depends.
Sometimes I repeat lines from TV shows very purposely. When discussing the tempering of chocolate, I quoted Alton Brown, word for word. I love Alton Brown. That's as purposeful as it gets.
But sometimes it's like phrases get stuck in my head, and I just have to repeat them. Other times, I repeat what people say to me right back to them. It's because I have trouble understanding the question and need to repeat back while my brain figures it out. If my mom asks me, "What dish do you want to cook this in?" I might say "what dish do you want to cook this in?" followed by "the appropriate vessel!" which is Alton Brown.