Lengths can vary within production and are guidelines only.
Maternity wear can be graded for lengths so can vary a little by size.
With some childrenswear sizing breaks there is often only 1-2cm difference in a length. If you allow tolerance on that and perhaps an 18-24mth top is 1cm too long (acceptable and going to happen in clothing manufacturing) and the 2-3yrs top is 1cm too small they may appear the same length.
They are not faulty, usually both can be worn by the right age child perfectly correctly. See also Miss Matched leggings.