Topic: Why does unemployment even exist?

Hello, here is a question that you may or may not be able to answer? Why does unemployment even exist? surely even in a country hit by recession there are still jobs that need to be done... otherwise the country would be running at optimum level and the country would not be in recession. It just doesn't make any sense at all. Yes automation of tasks that are now done machines has caused a lot of job losses..... but remember that machines cannot do a everything  you still need people to maintain and operate why not expand and use more machines and more people operating them?