Question: why agriculture was not a mistake?
Answer: Nor would humans have had the free time to develop math, science, literature, or any of our other modern conveniences. Without farming, humans would have remained trapped in nomadic low populations. So farming definitely wasn't a mistake for the spread, population increase, and technology increase of humans.