Why place repeated shell logic in a function?
It automatically launches a different shell for each command.
It permanently suppresses output from every enclosed command.
It copies the function body into the script each time it is called.
It gives the logic a reusable name and centralizes future changes.