GIF is big because it uses dictionary compression (pixel colors are mapped to a lookup table and then combinations of bits of increasing length are assigned to each table entry, the shortest combinations going for the most used colors, the longuest for the least used ones) which is great for stuff with clear (not-aliased) lines, a limited number of colors and large areas with just one flat color (such as drawings) but really bad for actual pictures (anything real world or imitating it, with natural shading).
Animation on top if it was a bit of a hack due to the header format allowing multiple images in the same file, so it’s really just a slideshow with not animation-oriented compression (i.e. each image is compressed individually and stored whole even if it’s pretty much the last image with but a handful of pixels changed), hence why it’s big when used for animation.
The kind of compression used in stuff like JPEG is based on the frequency of changes in blocks of pixels (i.e. it tries to match the image to a sum of waves of different frequencies) which is much better for natural images (but loses information as a perfect match is usually impossible) and video compression methods have all sorts of intermediate frame compression techniques the most basic of it is “this frame is the last frame with block such and such intact or moved around X pixels plus here’s a bunch of entirelly new pixels” which usually is a lot better than compressing each image individually and storing it, not taking in account previous or subsequent images.