Majority are simply to support opening different types of graphics (still and moving) files. Some are necessary just for the build process.
All in, I'd say it has remarkably little in dependencies that aren't directly connected to fulfilling the job it's supposed to do (bash, libtool, m4 - looks like build time does; libomp, highway, imath - useful optimization libraries; glib - living in C land is a PITA; shared-mime-info - useful for file type recognition and handling) and I would be totally unsurprised if some of them weren't transitive deps anyway (esp. libomp and highway).
Pretty much all of these are dependencies of imagemagick, because that supports tons of image formats, often via things like lib$format. The script itself just depends on bash, imagemagick, and a few standard shell tools like sed.