One tries to match the interests and resources of the participating teams to the tasks. This can succeed only if everyone is also willing to share the less interesting but necessary tasks. This in turn works because the physicists are motivated by the prospect of the exciting results to be obtained, and know that these depend on having a complete working detector system. Of course it is not always easy to arrive at an optimal sharing of tasks such that everyone is satisfied, and all tasks are assigned.