a gif is the 1980's 8 bit indexed format
with ONLY 255 tones and 1 tone as the alpha indexed tone
it is small in KiB.
well images needed to be in the 1980's and 90's when using dial up at 1 k /sec on average

a jpg is a 3 layer 8 bits per layer and there for 66% bigger before the lzm gif or lousy jpg compression