Firstly, the legumes absorb nitrogen from the air, fixing the nitrogen in the soil and storing it in their roots. This then makes it ready for the brassicas in the following year as they use the nitrogen to grow leafy growth, e.g. cabbage.
The brassicas are big root plants so they break up the soil perfectly for the potatoes the following year. Potatoes have a big foliage canopy, which helps to suppress weeds.
Next, legumes are planted where the root veg was previously, because the legumes prefer a loose soil, and the root crops will have helped you get that.