Answered: <SG15> Autonomous foul leading to a team losing

During autonomous, a Red robot drives diagonally across the field. It enters the low goal and scores one preloaded ball. None of the other robots score in autonomous. During the match, Red scores 5 more balls in their low goal. The blue robots don’t move for the entire match.

Before any penalties are applied, Red is winning the match because they have more points (16 - 0). Without the illegal action, they would have scored one fewer ball and the autonomous bonus would not have been awarded, but Red would still have won (5 - 0). Assuming that this means the match outcome was not affected by that foul, the autonomous bonus should be given to Blue resulting in a Blue win (Red 6 - 10 Blue).

If <SG15> applies, then the foul did change the outcome of the match (from a Red win to a Blue win) which is a contradiction.

If <SG15> does not apply, then the foul did not change the outcome of the match, which is also a contradiction.

How should situations like this be ruled?

(If <SG15> can result in teams losing a match that they could have won by not running their autonomous routine, then that’s clearly a bad outcome because it actively discourages novice programmers)

If there is a foul committed during the Autonomous Mode that does not affect the outcome of the Match, but does affect the outcome of the Autonomous Bonus, then the penalty will only impact the Autonomous Bonus. If the foul does impact that outcome of the Match, then a normal disqualification will be enforced. The impact of the penalty is not a consideration.

What I understand this to mean is that:

Whether a foul is match affecting should be assessed before SG15 is applied. Is this correct?

In the above example the score should be recorded as 6 - 10 in favour of Blue, with the autonomous bonus going to Blue. Is this correct?

Yes, both inferences you have made are correct.