I can't believe I'm actually explaining how a computer works like it's 1985 or something, but here goes. (And it's OK, because my engineering brain
loves explaining how stuff works
)
A computer (your phone, a laptop, or a bigger home computer, tower or desktop, whatever you want to call it) is basically one or more circuit boards with microchips on them.
Microchips get hot when they are doing calculations due to electrical resistance (imagine it as electricity slowing down as it goes through a component and all the electrons, which want to be very busy and move very fast, are banging against one another in an electrical traffic jam causing heat to be generated, compared to when they are flowing fast along something with low resistance) - this always generates heat, it's just physics, it's the way electrical conduction and resistance works.
If a microchip gets too hot, it will stop working - maybe temporarily, maybe permanently.
Your phone has microchips, if you leave your phone in the sun on a hot day it will turn itself off to protect the components.
Many computers of all shapes and sizes will do similar, if they have temperature sensors built into the circuit board to measure the temperature of the chip, most do.
Laptops are the same, they are in a small case and have fans with very shallow blades, and not much room for air to flow through the case. So the case can get hot during operation, especially if there are obstructions around any vents or dust inside the case or on the fan blades. The case can actually get very hot due to heat radiated from the microchips. The more you ask your laptop to do, the more calculations the chips are processing, the more electrical resistance there is and the hotter the chips get, and the hotter the case gets, and if it's on your lap, it can get more and more uncomfortable.
Now imagine the same components in a big case which is mostly empty, just air around all the components. There is a fan for every major microchip and the fan is secured right over that microchip to disperse heat from the microchip into the mostly empty space inside the case. There are also small fans either on the front and back or top and sides (or all of the above) of the large case, some of them pull in cool air, and some of them push out hot air. (There are also water cooling systems involving fans and a pump, but even now they are less common than a traditional fan set up, especially as fans that can run very quietly are available these days).
The microchips on the components inside a large case with the sort of fan setup I've described have heat drawn away from them very efficiently and safely, and you can make them do many more calculations than the same chip inside a laptop with fewer fans and less airflow. So a gaming (or video editing, which is also very demanding of microchips) home computer will work better than similar laptop, and will be a lot less expensive.
So the reason for a "massive gaming rig" is because lots of small fans and empty space inside the case allows you to get more/faster calculations from your microchips and have them stay cooler. The outside of my metal PC case stays much cooler than the case of a laptop during similar operation.
I hope that makes sense and is a good explanation of everything