It appears that Sony is making a profit actually -
https://www.digitaltrends.com/gaming/ps5-turning-profit-sony/
Even if is not the case anymore, they're not selling $1000 consoles for $500 to end users.
Companies are making huge profits with huge margins. To give an example about AMD and Ryzen vs. RDNA2:
6800xt 520mm^2 @ $649 => $1,24/mm^2
5800x 81mm^2 @ 449 => $5,54/mm^2
Since they're were making a profit after each 6800xt, they could have sold that 5800x @ around $154 ($1,24 * 124) and still make a profit. Instead, it was sold for almost 4.5 times as much.
PC Upgrades are not free or cheap.