For the record, you misunderstand the nuance of Rand, who’s philosophy of being was not only shown though protagonists.
Any writer who categorises characters and their utterances as “all good” or “all bad”, is writing for simpletons.
The quote attributes the writer, obviously.
For the record. This was said by the books borderline devil character main antagonist who explicitly used humor as a way to tear down anything of importance and make people not value anything.
Attributing it to ayn rand like it's her words she believes in is crazy.