Inverter's role is to generate a sinusoidal waveform. If you make a FFT of the two waveforms you will see there is a fundamental frequency (in you case 10Hz) and a lot of other peaks which correspond to frequencies which you do not need (distortion of this basic sine wave). There are standards on how much noise can your inverter generate if it is connected to the grid (as in solar inverter). If your inverter drives a motor some higher frequency components can have negative consequences on the drive operation (unnecessary heating, current flowing through ball bearings, etc.).

In case of modulation from figure one you can see a basic harmonic (1) and some higher order peaks. These peaks are quite easily removed using relatively small filter. The further these harmonics are the smaller filter you need to use to remove them. If you cancel all higher frequency peaks inverter output will be purely sinusoidal. Therefore increasing the switching frequency lowers the demand for filtering.
In case you use modulation form figure 2 you will have, apart from fundamental frequency, many low frequency peaks in the voltage spectrum. They are really hard to remove as they lay very close to the fundamental frequency. Your filter will not be able to pass the fundamental peak and damp the low frequency harmonics. Your output becomes distorted. This case has some benefits. Implementation is easy and the switching loss of the transistors are very low. This is why this type of converter is used e.g. in cheap UPSs and in locomotive traction converters.