Stacks, of varying kinds, appear in algebraic geometry whenever we have moduli problems, most famously the stacks of (marked) curves. But these seem to be to be very geometric in motivation, so I was wondering if there are natural examples of stacks that arise in arithmetic geometry or number theory.
EDIT: the question is now at MO.