From what I can gather thus far, the game isn't using Driver Rating or Sportsmanship Rating to create groups, nor do they have any determination on points. It is simply going off of the practice times. It takes the Top 20 fastest practice times who enter that particular race of the five, then the next 20, then the next 20, and so on. The reason people aren't realizing this is that when you are entered in a group, unlike the Daily Races, it does not display your practice times, everyone is blank as they have yet to set a qualifying time. It then ranks each group from 1st to whatever the last group is, and it then adds weight to each group's points.
So you can be an S/S rated driver and end up with a C/B driver in your group if that driver lays down a practice lap similar to your own. As for ending up with dirty drivers in your group, that is down to the fact that those people may be able to set a fast lap when they're by themselves, but have no race craft and an inability to make good passes. And since everyone should theoretically be on equal footing as they were all from the same practice times, it may be difficult to pass someone who has the same lapping skill as you do.