In human crowds as well as in many animal societies, local interactions among individuals often give rise to self-organized collective organizations that offer functional benefits to the group. For instance, flows of pedestrians moving in opposite directions spontaneously segregate into lanes of uniform walking directions. This phenomenon is often referred to as a smart collective pattern, as it increases the traffic efficiency with no need of external control. However, the functional benefits of this emergent organization have never been experimentally measured, and the underlying behavioral mechanisms are poorly understood. In this work, we have studied this phenomenon under controlled laboratory conditions. We found that the traffic segregation exhibits structural instabilities characterized by the alternation of organized and disorganized states, where the lifetime of well-organized clusters of pedestrians follow a stretched exponential relaxation process. Further analysis show that the inter-pedestrian variability of comfortable walking speeds is a key variable at the origin of the observed traffic perturbations. We show that the collective benefit of the emerging pattern is maximized when all pedestrians walk at the average speed of the group. In practice, however, local interactions between slow- and fast-walking pedestrians trigger global breakdowns of organization, which reduce the collective and the individual payoff provided by the traffic segregation. This work is a step ahead toward the understanding of traffic self-organization in crowds, which turns out to be modulated by complex behavioral mechanisms that do not always maximize the groups benefits. The quantitative understanding of crowd behaviors opens the way for designing bottom-up management strategies bound to promote the emergence of efficient collective behaviors in crowds.