There's a lower limit to the size of proteins for a functional domain size. If they wee lower than 40 they would not be able to maintain their fold. It is necessary for the number of residues to perform a particular biochemical function.
There's an upper limit to the size of polypeptides because the longer it is the longer the mRNA and the gene is. If it was larger it polypeptides would have debilitating mistakes hidden in the genes.