An algorithm is a step by step process to accomplish a task. It is used everywhere in programming, especially when borrowing complicated algorithms designed for specific jobs.
Talking about why we should use algorithms in programming, we must understand that computer programs adopt different algorithms run on computer hardware which has a processor & memory, and these components have limitations. A processor is not infinitely fast and the memory we have is not free. They are bounded resources. They must be used wisely and a good algorithm that is efficient in terms of time complexities and space complexities will help you do so.