This is a common corny joke told frequently at dinner parties or some other form of social gathering. The punchline is because they heard it was a waist of energy, waist being a pun on waste, this is the kind of joke that could also be described as a "dad joke".