FFT of time-compressed signal not outputting correct amplitude spectrum
You have 4 times as many cycles in the time -5:ts:5. If your y and g signals had the same number of cycles and different frequencies, then the expected result would have appeared I believe. In short, g is not time compressed version of y as we can verify by simply counting the number of cycles in each signal.
Time domain comparing time compressed signal and higher frequency signal

higher frequency signal has more cycles that time compressed version.
Code comparing time compression and just a higher frequency

fs = 100;

time = -5:1/fs:5;

y = sin(2*pi*time);

time2 = -5/4 : 1/fs : 5/4;
g = sin(2*pi*4*time2);


h = sin(2*pi*4*time);

f1 = linspace(0, fs, length(time));
f2 = linspace(0, fs, length(time2));

plot(f1, abs( fft(y) )/fs, '.-');
hold on;
plot(f2, abs( fft(g) )/fs, '.-');
plot(f1, abs( fft(h) )/fs, '.-');

legend('original', 'time compressed', 'higher frequency');

grid on;
xlim([0 10]);

Result