Programming was challenging enough in the days when scientists in lab coats were writing code for their own use on a single mainframe computer located in a cellar just a few meters away.
But the apps that we write - that you write - today, now run on thousands or millions of machines, operated by thousands or millions of users, who are connected to millions or billions of other machines. There is simply no way that all those users and connections are going to behave themselves, and as for the other developers (who are filling servers all over the globe with code that has to deal with millions of apps like yours) that expect to have things their own way, well, you can imagine, it's a bit of a jungle out there.
So, we need to deal with unanticipated situations occurring constantly. We need strategies to deal with one piece of code being told to do something it can't that will keep...