As far as I know, console manufacture comes with supply agreements- you agree to supply X number of processors at Y cost... even if the price of those processors, when fitted to a PCI Express card instead of a PS5 motherboard, would net 3 times the profit.
It's also a nice way to get out of having bad drivers- if developers are making games to the PS5 standard, then any errata becomes their problem more than strictly AMD's...
The situation with TSMC being super super limited during the pandemic is unusual, and it was significantly amplified by the crypto boom happening at the same time. Normally it's actually a pretty good deal for AMD in a lot of ways.
The console companies tend to be very very conservative in their designs though and letting the console companies set the direction has left AMD significantly behind on many task-specific accelerators like tensor and RT. And tensor is no longer a niche thing, neural accelerators have been everywhere in phones for ages, Intel's laptop chips have had neural accelerators since 10th gen, intel desktop 11th gen had it, AMD's own 7000-series CPUs have neural accelerators, Intel GPUs have it, etc. Different product segments are finding different uses for it, and AMD has been not just left out of the rain but actually is slowing the development of the whole field because of how tardy to market they are. And beyond that they've taken a strongly anti-consumer position against open APIs that allow other brands to utilize hardware accelerators or closed-source libraries.
https://youtu.be/8ve5dDQ6TQE?t=974
Similar problem with RT... AMD's implementation is very lackluster and has been slowing the whole industry down. It's about half the performance of NVIDIA's first-gen implementation. A lot of times it just seems like AMD automatically assumes that NVIDIA is incompetent and wasteful, and there's some big savings to be had, so they'll take whatever NVIDIA does and cut it in half or a third or whatever (which is what they're rumored to do with tensors next generation - it has "accelerator instructions" but less powerful than the full dedicated units on CDNA, and presumably weaker than NVIDIA's dedicated units as well). Not sure if it's that, or if they're just cheap on silicon, especially with the console market's influence...
It's why Intel and Nvidia refused to work with Sony and Microsoft for their console chips and only AMD took the original contract since they were close to bankruptcy at the time so every extra dollar mattered for them.
Early VC funding rounds are way less than you'll see when your product goes to market too. Applying your accounting philosophy, a couple million bucks surely must be insignificant compared to billions of dollars of sales revenue we'll see later, right? And they want how much equity? What a terrible deal.
Except for the part where you fold years before you get to "later", of course.
And that was a very, very, very real concern with AMD. They were right on the edge for years and years during the Bulldozer years, Ryzen was very much a last-chance move for them and they were obviously still scraping bottom for the first couple years even then. There are numerous factors that all aligned to keep them alive - they would not have been alive without Intel misstepping on 14nm (the early days were very bad) and then 10nm, they would not have been alive without Apple writing huge R&D checks to advance TSMC 7nm and 5nm far enough ahead of the market that GloFo bowed out of the game, they would not have been alive without consoles keeping the lights on while they spent every penny on Zen R&D, and they would not have been alive without their interconnect turning all their IPs into legos and allowing them to break and scale them.
Things were really, really, really touch-and-go for AMD in 2016/2017/2018. I figured they were going under. I have no doubt that console R&D money (along with those other factors) was instrumental in keeping the lights on at RTG.
The GPUs in Xboxes and Playstations are custom silicon.