Yeah,
this has been debated before. I actually found this article on a Facebook page dedicated to interesting Wikipedia pages just last night. Quite a coincidence...
But anyway, the premise makes sense to me. If you give a monkey (or any device that produces an abstract combination of letters and symbols) enough time - even if it takes several trillion years (or longer), almost certainly will the complete works of Shakespeare be produced. That is
if the monkey or subject of the experiment is indeed given an infinite amount of time to perform that feat.