Programming is like teaching a baby. Bear with me on this : Imagine you want to explain to a baby how to go shopping for carrots. You will do the same thing as teaching a robot.
First he has to learn to walk. Walking subroutine. I won't go into details but he must place a feet in front of the other and balance his weigth. You have to manage the exception where he falls or is confronted by an obstacle.
Then he needs geographic specification on the location of the super market.
He must be told to use the walking subroutine until he finds the market. If he doesn't find the market in a reasonnable time (must be defined), he must initiate the return home routine.
If he finds the supermarket he must locate the carrots using the carrots reconnaissance algorithm. He must compare every object with the carrot 3D model from his databank. Reasonnable time again (or timeout).
Then he must evalute a place to trade thoses carrots with money to gain permanent access to the carrots. This part could be real tricky.
Then he must evalute the price based on current carrots internationnal pricing versus the ressources needed to obtain lower priced carrots at another location.
I'm only half way through the process and you catch my drift. And I skipped a LOT of checks and exception, evaluation, recognition, etc. It would take months, maybe years, for a full team of developpers to program this. And it only goes buying carrots.
What I'm trying to say is that when you are developping an application, you have to "tell" it everything, literally everything. For every detail that is not clearly specified, you will have surprises : "random" behaviors, errors or simple shutdown. You have to tell to the program what to do in a general situations and how to adapt when the situation changes. Programming is like teaching a baby a very very complex task.
Then comes the worst part. You can't hold the baby's hand through the whole process. You make sure he has everything and let him go. 2 possible outcomes : everything works fine from beginning to end as expected (never happens) or the baby is sitting down somewhere in the middle of his task, crying, and you can't ask him what went wrong. He's just crying and won't stop. And then the debugging begins.
Now you can better imagine how much efforts is needed to build a software that manages stocks exchange, or an automated lawn mower, or a plane ! How much time would you need to teach a baby how to pilot a plane ?