This is a wildfire. Shutting things down slows the fire's movement which buys time to fully track it and isolate only the affected individuals.
Specific to Italy, their hospitals are already past the breaking point in many areas. So people that would be easy to treat with medical resources are dying because the resources are exhausted. By stopping the immediate spread by isolating everyone their hospitals can get to a stable point in a few weeks.