Retailers, health-care providers and most other service-oriented businesses expanded in July for the second month in a row, suggesting the economy showed more resilience than expected even after a spike in coronavirus cases caused many states to reimpose restrictions.