Msys2 by design restricts the available packages to those useful for compiling software for Windows. The emacs package is in their separate mingw repository, which means the produced binary is a Windows program and does not understand the posix environment at all (i.e. no /proc/, /dev/ etc).
Cygwin is an OS that runs on top of windows - all cygwin programs are windows programs but not all windows programs are cygwin programs. The emacs package for cygwin can fopen() /proc/ and /dev/, use the linux socket API, and in general follow the linux makefile more closely.