Distributed computing
GPU have many shaders units usually more than 2000 of them. They normally where designed to compute pixels but instead in the case of mining it allow processing > 2000 computations per cycle. Massively parallel compared to just using a CPU.
So it come done to run the hardware at full power, full time, The more computation you do, the more reward you get.
Different internet magic coins have different mining algo. Say, SHA-256 for Bitcoin and most shitcoins, Scrypt for Litecoin, Kawpow for Ravencoin, RandomX for Monero, etc etc. Some Algo are more suitable for ASIC mining (specialized hardware that can only do that), Some are more suited for GPU and some for CPU.