WEST SACRAMENTO, Calif.—Hundreds of goats munch on long blades of yellow grass on a hillside next to a sprawling townhouse complex. They were hired to clear vegetation that could fuel wildfires as temperatures rise this summer. These voracious herbivores are in high demand to devour weeds and shrubs that have proliferated across California after a…