I believe I hit a bug, which I'm able to reproduce. My course has three sections of ~22 students each.
- Create a Group Set
- For Group Structure, select "Split number of students per group"
- Check "Require group members to be in the same section"
- The wrong number of groups are created, with the wrong number of students
Something seems to be wrong with that combination of options. Works without the "Require group members to be in the same section", or by setting to "Split students by number of groups".