Getting random documents with aggregate $group

You should not rely in having a particular or consistent order if you do not sort.

See MongoDB: imported documents do not keep the same order if were inserted through insertMany()