we're a supermarket, not a computer company
Why do companies outsource? simply because they can.
In the "bad old days" there were no software houses, who would take your requirements and mangle them into something that bore no resemblance to what you wanted, needed a computer the size of the planet to run and was delivered - full of bugs - 18 months late. All these good things had to be produced in-house. Therefore any commercial enterprise of any size (J Lyons, anybody?) had to have an IT department churning out the software to keep the biz. running.
Later, when COTS software arrived, the IT dept. became customisers, tweakers and responsible for keeping the whole mess of incompatibilities more-or-less running. Later still, they became the people who pressed the button that took the backup, told the users to reboot their PCs and tried their hardest not to screw up the LAN - well, not too much anyway.
For all these changes, the one thing that has remained the same is the core business. Whether it's being a supermarket, a plumber, a bank or whatever - this is what makes the money that payes everyones' wages - not the IT element of the organisation. So when the opportunity presents itself to get shot of the whole kit 'n' kaboodle you shouldn't be surprised when the board of directors breathes a sigh of relief and signs a very large cheque.
So far as the perfect balance of resources goes, it's the same as always: let the people who do it best get on with it. In the IT world that means the specialist companies who provide the software, the design skills and the business analysis to tell you what you really, really want.