Explain the Olympic badminton singles grouping?

First of all, you should know that grouping/lottery is not absolutely fair, there are some lucky factors in it. Secondly, the seed players are ranked according to the world ranking before the Olympic Games, not according to the competition results between athletes. As you said, even if No.3 can play No.2 every time, if No.2 scores higher, he is a higher seed player.

When arranging the competition, the first thing is to ensure that the No.1 and No.2 seed players can fight all the way to meet in the final. In many competitions, the fourth and first seeds will be ranked in the upper half, and the third and second seeds will be ranked in the lower half. However, this Olympic Games only ensured that No.3 and No.4 were not in the same half area, and the result of the lottery was that No.3 and 1 were together, and No.4 and No.2 were together.