The wall warts are cheaper in the low watt range. That's the main reason. If you need more than "x" watts, the brick is required to get all the bit in there and to have enough surface area to dissipate the heat.
The number "x" has changed over the years, the original Commodore VIC20 used a linear brick. Linear wall plug adapters (unregulated) were limited to a few watts.
Fast forward to 2014 and we have 10W or more of regulated output easily available in a wall wart. Laptops tend to need many tens of watts, so a brick is the only way. The safety-agency-approved power cord is heavy, costs money and is relatively bulky, whereas a low voltage output cord can be thin and light.
Bulk is an important factor in electronics because sea shipping cost is inversely proportional to the number that can be stuffed into a sea shipment container (cost is not determined by weight for low density items). Lower unit cost is even more important- I have sourced wall warts in volume, but not yet bricks, but I think the bricks would increase retail price by at least several dollars.
The globalization Brian mentions is easier with bricks, but if the package is stuffed with the everything needed for a given market the cord difference still has to be accounted for at the factory. For expensive stuff, the cord may be a separate line item on the order, but that's for companies like Tektronix and Leica (two I've run into) not mass market products.