To gather things together on purpose. Collecting is what makes a set out of scattered instances.
Latin colligere (to gather together, to bind up), from com- (together) + legere (to gather, to choose, to read).
To gather things together on purpose — collecting is exactly what turns scattered instances into a set.