Why Functions Matter So Much
A function avoids repeated logic and forces you to think of one task as one reusable unit.
If you calculate a total many times, it makes little sense to rewrite the same structure over and over.
A function lets you encapsulate that task, give it a useful name, and call it whenever you need it with different data.