For some of those years, human ancestors weren't particularly intelligent. I'm not going to pick any qualms with the idea of extending the paleolithic back far enough to include some of our upright lower primate ancestors, but even though they might have walked like humans, their intelligence levels were close to those of a chimpanzee or a bonobo. They just weren't very bright. Some of the more recent human ancestors probably still couldn't have figured out something as complex as farming or urban building.
Within the history of H. sapiens sapiens, agriculture and urban living really wasn't the best option to begin with. There's a lot of controversy over why we made that odd call in the first place, and I'm not going to go too deep into it here. Suffice to say that it probably wasn't really much of a choice whatever caused it, because a hunter-gatherer lifestyle had a much higher quality and was usually much longer than life in a very early city. After that, it just kind of snowballed until agricultural civilization was really the better decision, and technological innovations developed more rapidly due to the greater degree of free time that artisans had relative to members of a nomadic society.