Butterworth filtering behaving unexpectedly -MATLAB
The effect you observed is mainly due to spectral leakage. It is a property of the DFT and it is only indirectly related to the Butterworth filter. Note that there are an integer number of periods of both sinusoidal components of y inside the DFT window. That's why you see two nice peaks in the frequency domain without any leakage. If you truncate y only by a few samples, you'd get spectral leakage even without the Butterworth filter, because now the period of the signal doesn't line up anymore with the DFT window:

plot(abs(fft(y(1:97))))


The output signal of the Butterworth filter shows some transient before it converges to its steady state. So it is not purely sinusoidal, and - more importantly - the number of periods of the strong sinusoidal components are not aligned with the length of the DFT window. If you remove the initial transient and if you make sure the DFT window aligns with the periods of the sinusoids you get two perfect spectral peaks:

plot(abs(fft(dataOut(11:100))))