Windows installers for Freeciv contain much more than just the freeciv program produced by the freeciv project. We depend on many third party libraries, distributed as dlls in Windows world. Installers contain also all these dlls. In case of msys2 based installers, these dlls come from the msys2 environment. Dlls are copied from the environment used in the building of the installer.
Msys2 provides simple unix/linux like shell (commandline) environment to Windows. So it runs on Windows, and can be used to build freeciv, and freeciv installers, for Windows. See also Msys2 As Development Environment.