When postgresql was being ported to windows there was a need for a portable scripting language. They standardised on perl in part because you can get it to run just about anywhere, even windows.
The intention was to not require it on UNIX systems but as it turned out some bits were missed but no-one ever complained. Apparently no-one had tried to compile postgres on a system without perl installed. Whatever you may think of it, it *is* everywhere.