Every business is unique, and a custom solution can support that uniqueness, rather than the compromises that can need to be made with a (customizable) packaged solution.
I've seen one company write off a 100 million dollar investment in a Peoplesoft based replacement for a custom system, because it was realized that the compromises that solution required were becoming too great. Sure it was fabulous for 80% of requirements, but the other 20% became a giant sinkhole of money and pain.