Don't quote me on this but I think it's just a matter of convenience. The substitution reaction is reversible, so to increase amide yield, you use an excess of ammonia to drive the reaction forward. With an acyl halide, you get a HX byproduct, which can react with some excess ammonia in solution to form NH4X for a total of two ammonias consumed in reaction. With an anhydride, the initial reaction froms an amide and a carboxylic acid. The carboxylic acid can then react with another molecule of ammonia to from an ammonium alkanoate, again for a total of two ammonias consumed. In both cases, the second ammonia is used in a subsequent reaction with the byproducts of amide formation.