Why does the ketone carbonyl group react in preference to the ester carbonyl?

Is it something to do with the resonance occurring into the ester carbonyl from the oxygen? but how does this make the ketone carbonyl more likely to form the ketal when reacted with a diol and non aqueous acid?