I'm not an engineer, but I've worked alongside product development for a long time. There are many reasons for using wall warts -- assuming they're well engineered with all of the necessary approvals. Probably the main one is that the output is "low voltage" meaning that the product being powered qualifies as "low voltage" as well.
Another reason is to outsource the engineering of subsystems, and exploit economies of scale. For instance it's hard for a bass amp maker to make a thousand power supplies a year, but easy for a power supply maker to make a million a year. Same reason why we don't make our own capacitors, but at a higher level. And the makers of those higher level components are eager to earn your business by making sure their designs will contribute to successful regulatory testing. For instance the parts might not qualify for UL approval by themselves, but are designed and documented according to those standards.
For extremely small gadgets, the wall wart is smaller than an IEC power cable.
For very small products, power consumption is often low enough, and margins high enough, that you can afford to over-spec the power supply. "When in doubt, make it stout." This gets difficult to impossible when you get into power levels where a) over-design is un-economical, and b) the performance of a product is affected by the interaction between the device and its power supply.