This seems like a simple task. Get all the ingredients and put them together. This is simple to explain to human because they can make choices on their own and generally understand how a food is constructed. But when are are trying to teach a robot how to make a sandwich you have to exaplain every little detail because it doesn't understand that bread comes in a plastic bag or how to open it, or where the fridge is, or not make the sandwich on the floor.
Everyone in the class got the question wrong because they were all missing details.
I believe that code is going to be around for a very long time because it is currently the only way to truely express 'exactly' what you mean.