We compare the degree because you cannot divide the polynomial of a lower degree by a polynomial of a higher degree so if at the initial step this is satisfied then we check for the remainder in this fashion only, as if the degree of the divisor is greater than what is left after a few steps then the division is stopped and the part what is left is the remainder.