A non sequitur (English: /ˌnɒnˈsɛkwɪtər/; Classical Latin: [noːn ˈsɛkᶣɪtʊr] “it does not follow”) is a conversational literary device, often used for comedic purposes. It is something said that, because of its apparent lack of meaning relative to what preceded it, seems absurd to the point of being humorous or confusing.
This use of the term is distinct from the non sequitur in logic, where it is a fallacy.
https://en.wikipedia.org/wiki/Non_sequitur_(literary_device)