Difference between two sine generators
The two oscillator types are equivalent, because the factor PI can be moved to freq and need not be present in the final equation.

The difference in the plots is not due to one oscillator type being better than the other; they are equivalent. The difference seen is spectral analysis artifacts that depend on the frequency of the sine and how that relates to the Discrete Fourier transform (DFT) length. DFT decomposes the time-domain signal into harmonic frequencies (multiples of a fundamental frequency that has a fundamental period equal to the analysis window length). If the sine frequency is not exactly at such a harmonic frequency, the sine "energy" still needs to appear somewhere in the frequency domain and will be spread to multiple frequency bins. The plots in this question on such spectral leakage are very similar to yours. Spectral leakage can be ameliorated by multiplying the data by a suitable window function before DFT.

With the oscillator of type a, if freq is of form some_integer*2*PI/N, where N is the DFT length, then the sine frequency is one of the harmonic frequencies seen by DFT and there will be no spectral leakage.