Based on what data? Contract bidders must show all direct and indirect costs and are typically allowed to price in ~10% profit when submitting their proposal. In fact, you can look at historical financial data for LMT, NOC, GD, etc and see profit margin float around 7-10%. A proposal with 30% profit margin baked in would be laughed out of the selection committee.
Microsoft could get better engineers for cheaper. Including within the US. The problem is that this isn't about engineering. It's a scheme.
They have become so incompetent that they don't even have the talent necessary to know what talent looks like when recruiting.
Corporate engineers will never hire other engineers who are better than them (for political reasons), so the engineering talent in these companies has been degrading for years as the bureaucracy and internal politics has increased.
Not all experience transfers over and developing completely new technology (both hardware and software in combination) is extremely hard. I think you're vastly underestimating the value people get from these university degrees when they're actually pioneering new things and actually learned the topics they were taught.
Do you work at MSFT? How do you know so much about their competence?
One reason why they suck at web is because they suck at interoperability. They can't do open source properly. They don't know how to optimize software for maximum compatibility. This is because vendor lock-in is the enemy of compatibility and interoperability. Vendor lock-in is in their DNA; everything they do is about lock-in. Their software is all about complex, rigid interfaces; this is how they achieve lock-in but it makes it difficult to integrate their solutions into third party software (high friction, high entry barriers) and difficult to maintain/update.
VScode?
There are nowhere near 70k engineers working on this - I'd be surprised if even 7k - but this has been in development for years, and will be in development for a few more.
Depending on how many headsets they planned to deliver - I wouldn't be surprised if they each cost more than $1k - there are like 60k infantry soldiers - so that could easily cost >$60M.
I'd imagine they spent >$100M lobbying on this and Jedi.
I can't see how this would cost anywhere near $22Bn - but military contractors are known to have profit margins >30%.
I'm obviously missing a lot of things - but I wouldn't be surprised if this cost MSFT >$10Bn.