42069 is a concatenation of the numbers 420 and 69. Since 420 is associated with cannabis consumption, and 69 is a sexual position, having these numbers together is the pinnacle of middle school naughtiness, in 5 short digits.

The state of humor, and internet humor, being what it is, the joke of "42069" is not that most people think putting two numbers with giggly connotations together is funny, but that in a meta way, making such a juvenile reference is itself funny, as we all pretend to be much less mature for a few moments.