From Wikipedia (emphasis mine):
The most basic method of checking the primality of a given integer n is called trial division. This routine consists of dividing
nby each integermthat is greater than 1 and less than or equal to the square root ofn. If the result of any of these divisions is an integer, thennis not a prime, otherwise it is a prime.
Why do we assume that if n is not a product of any number between 2 and sqrt(n) it is also not a product of any number higher than sqrt(n)?