If you are looking for a long but really interesting and informative read on the subject, this author/designer has a really great and in depth series explaining that vanity sizing as most people think of it is a myth. Fashion Incubator » Blog Archive » The myth of vanity sizing
The tl/dr is that due to pattern making scale, companies set their size medium (or median numerical size) to encompass the largest portion of their intended client base. So clothing for older people (Talbots) or poor people (Walmart/Target) tend have a larger medium size than clothing for the young (H&M, Zara) or rich (Chanel). They also all have different fit models, which is a whole other kettle of fish but explains why some clothing is proportionately bigger through the seat vs the waist.