Lagrange's Theorem states that if is a finite group and a subgroup, then the order of divides the order of . It generalises to infinite groups: the statement then becomes that the left cosets form a partition, and for any pair of cosets, there is a bijection between them.
In full generality, the cosets form a partition and are all in bijection.
To specialise this to the finite case, we have divided the elements of into buckets of size (namely, the cosets), so must in particular be an integer.