Why are amides less electrophilic than ketones, and esters...?
Consider resonance structures,
The second structure is the amide equivalent of an enolate anion. Evidently, more electron density is concentrated on the oxygen rather than the nitrogen centre, hence the oxygen is more basic. Even though the nitrogen has a formal lone pair, it tends to donate electron density to the oxygen centre.