Yeah, consoles are normally (except when an idiot is in charge at Microslop) what they call a "loss leader" - an item that you sell at a loss because you'll make up for it in other purchases now that the customer is in the store.
With a console, the idea up until recently had always been that you lose money on the console but make up for it several times over with game sales, generally making it more affordable than a PC of similar specs.
There was a period of time where you could build a PC with better specs for the same price as a console, but hardware prices going up in the past 10-15 years meant that that really hasn't been the case for a while.
Seriously. I have some DDR3 RAM and a motherboard with processor laying around somewhere that I recently was considering digging out to make a second computer out of as a home storage/media server/pihole analogue, and I bet I could still get low quality settings on most recent games to play nicely with whatever parts I can scrabble together.