The first clause expresses a positive sentiment, while the second clause reveals a negative sentiment.
this may be explained with the incongruity theory, where the  setup of the text prepares an expectation for the readers, while the punchline breaks the expectation.