I once caught a 4IV Riolu.

There isn't anything restricting having better IVs, but it's still unlikely that you'll get many. The odds of a given Pokemon from the Friend Safari having a certain number of perfect IVs is 1/32^(

*n*-2) where

*n* is the number of perfect IVs. Because the variable is in the exponent, which is in the denominator, the odds get really low, really fast. Of course, it's worse outside the safari, since you don't get that -2. Legends fare a bit better, with a -3 instead. But despite all this, it's still exponents we're dealing with, and exponents of 32 at that. Getting many perfect IVs at random just doesn't happen often.

Which is why everybody breeds for them.

Warning: User is known to the state of California to get preachy.