The gag is that we know the answer.

Could infinite monkeys eventually write the complete works of Shakespeare?

Yes, because we are the monkeys, and one of us monkeys was called Shakespeare, and he did indeed write the complete works, by tautological definition, and it didn’t take an infinity of monkeys, it took approx 94 billion, that being the number of humans who had ever lived till 1650, and it didn’t take an eternity but only 190,000 years.

An infinite number of monkeys eventually wrote this blog post
from Interconnected favicon