The point is that once the eps of the max value is greater than 1, you cannot represent contiguous sets of integer values in double precision. E.g.,
So double precision could represent 2^52 + 1 exactly, but you see it will not be able to represent 2^53 + 1 exactly because eps(2^53) is greater than 1. So then the question becomes what makes sense for randi to produce as output when it can't represent all of the integers in the desired range? It doesn't make sense, hence the restriction.