The document discusses why the size of an array in a hash table should be a prime number. The size is used to calculate the array index when storing an object using a modulo operation on the object's hash value and array size. If the size is not prime, collisions could occur for hash values divisible by the size, triggering complex collision resolution logic and slowing lookups. Using a prime size helps reduce collisions after applying the modulo function.