A lot of companies make the mistake of outsourcing what they are good at or what their core business is.
Some outsource everything
You will see a lot of carmakers just putting their brand over something. Like Suzuki which just puts in a logo on Maruti Ertica which is developed by Toyota. Some even put their brand on cosmetics which has nothing to do with cars.
Or what a lot of Indian smartphone makers did. Micromax and Lava which just bought products from Oppo and put their logo on it.
A few years pass and original manufactures became so good at developing and marketing that they started to sell themself and took over the market.
Some build almost everthing themself
There are companies like Tesla and SpaceX which build everything themself.
They realized that building themself was not just cheaper but they could iterate fast and build better because it was custom made for themself.
As a result, not only they built better products but they develop a lot of Intellectual Assets, IPs, and Patents that their competitors could not replicate.
Tesla builds it’s own software and CPUs for auto-pilot technology which rest are taking help from Google.
SpaceX designs and builds everything on its own. While Boeing buys existing products.
Apple outsources production but still designs everything by itself. While rest rely heavily on Google for phone software and Microsoft for PC software.
Some companies take control back.
Apple is taking back control of its microprocessors because it realized that it can ship better products if it designs the chips themself.
And it is not something that they just decided to do overnight. It must have been planned for years and developed for years.
And still, the rolling out is a 2-year transition giving everyone enough room to adapt. And from what current iPads perform it can be assumed that these new computers will perform better.
Ofcourse you should outsource if …
A large Hollywood studio need not worry about their backend software. It’s not their core business. Their business is making great movies.
A hospital need not build it’s own hospital management software. Either they just buy it or outsource it.
But as discussed above there may be advantages to building it themself 🙃.