Contracting for Government Services: Theory and Evidence from U.S. Cities