Every cotton fibre has a length, measured before it's ever spun into yarn. Fibre under about an inch is called short-staple; anything past an inch and a quarter is long-staple. That single measurement decides more about a finished garment than almost anything else in its construction.
Short fibre has to be spun with more twist to hold together at all, and the ends of those short fibres are what work loose over time — that's what pilling actually is. Long-staple fibre spins into a smoother, stronger yarn with fewer loose ends to begin with, which is why a long-staple knit resists pilling and holds its shape wash after wash instead of gradually going fuzzy and slack.
You can feel the difference before you ever wash it. A long-staple knit has a quiet, dense hand to it — it doesn't feel hollow or papery when you close your fist around it. That first-touch feeling is the yarn quality announcing itself, not a finishing treatment sitting on top of it.
The real test is further out. A short-staple knit that felt fine in the shop starts pilling at the underarms and cuffs within a handful of washes. A long-staple knit is still holding the shape it had on day one. That's the difference staple length makes — not at the register, but a season later.