The evolutionary stability of cooperative traits, that are beneficial to other individuals but costly to their carrier, is considered possible only through the establishment of a sufficient degree of assortment between cooperators. Chimeric microbial populations, characterized by simple interactions between unrelated individuals, restrain the applicability of standard mechanisms generating such assortment, in particular when cells disperse between successive reproductive events such as happens in Dicyostelids and Myxobacteria. In this paper, we address the evolutionary dynamics of a costly trait that enhances attachment to others as well as group cohesion. By modeling cells as self-propelled particles moving on a plane according to local interaction forces and undergoing cycles of aggregation, reproduction and dispersal, we show that blind differential adhesion provides a basis for assortment in the process of group formation. When reproductive performance depends on the social context of players, evolution by natural selection can lead to the success of the social trait, and to the concomitant emergence of sizeable groups. We point out the conditions on the microscopic properties of motion and interaction that make such evolutionary outcome possible, stressing that the advent of sociality by differential adhesion is restricted to specific ecological contexts. Moreover, we show that the aggregation process naturally implies the existence of non-aggregated particles, and highlight their crucial evolutionary role despite being largely neglected in theoretical models for the evolution of sociality. 