Let me change my question to this perhaps it would be clearer
why writing data result of select statment from PG server to file on disk using copy statement is much faster than getting same data through PGAdmin via libpg on the same PC on the same system on the same connection (localhost) ?
COPY to filesystem can use a more CPU, and on modern computers, a data are stored to write cache first - and real IO operation can be processed later.
PgAdmin uses only one CPU and works with expensive interactive element - grid - probably there are some space for optimization - usually fill 40K rows to pgAdmin is not good idea (it is not good idea for any client).