It just so happens that many video codecs are based on image formats, so ffmpeg already has a lot of the complex machinery to do so available to also implement these image formats - internally it can just handle it as a single frame of video with specialized formats for that.
Imagemagick (and other tools) also work, but why use multiple pieces of software if what you already have is adequate? ImageMagick is also software, and can also have vurnabilities.
It just so happens that many video codecs are based on image formats, so ffmpeg already has a lot of the complex machinery to do so available to also implement these image formats - internally it can just handle it as a single frame of video with specialized formats for that.
Imagemagick (and other tools) also work, but why use multiple pieces of software if what you already have is adequate? ImageMagick is also software, and can also have vurnabilities.