I think one of the main reason of this is because consoles used to have special designed hardwares, making them better at running games, at least in some aspect. For example, when PlayStation was released, the majority of PC did not have 3D acceleration chips. PlayStation 2 has this crazy embedded RAM which has insane memory bandwidth, and PlayStation 3 has this Cell architecture thing. It's even more profound before that, such as SNES which has a lot of specialized chips such as the sprite engine and audio processor, where PC at that time had to do everything with the poor CPU.
However, it becomes clear probably around the time of PS4 that designing special chips specifically for consoles can no longer compete with the economy of scale of a PC. So consoles gradually went from special machines specifically designed for running games to a medium range PC. They are still cheaper, but when people want better hardwares, they don't have choices other than going for a high end PC.
This problem could go away if you can sell more consoles, achieving some sort of economy of scale. Unfortunately, in recent years it's clear that the market size of consoles is not growing. PC is probably not growing a lot either, but in terms of market size, PC (including all kinds of PC) is many times larger than consoles. Around 200M PC shipped every year for recent years even after a downturn. That's more than the all time sales of the PS2, which is probably the best selling game consoles of all time.