It's not just teaching maths though. As Hans Kray demonstrated with his answer it also encourages lateral thinking. Besides, on-the-hoof maths is very important and you would look quite stupid resorting to a spreadsheet in many Day to day situations where similar maths arises.