Why this matters
Using panic for normal errors will crash the program and skip normal error handling logic. It makes the code less robust and harder to reuse. By returning errors, you allow the caller to decide how to handle the failure, leading to more graceful degradation and better reliability.