For some companions their backstory forced them into certain classes. It wouldn't make much sense for Wyll to be a barbarian. To satisfy your will to have different class combos they need to implement mercs. Or make all companions recruitable fairly early in the story.