The president and his allies have berated local officials. Yet the federal government has often made it harder for those officials to manage the capital.