Agriculture is unlikely to be the reason it evolved, as agriculture is only a few tens of thousands of years old. However fertile soil is also a good sign if you are a hunter/gatherer; it implies rich plant life, and therefore things to gather and maybe also things to hunt.
Adult lactose tolerance isn't much of a change, because humans were already lactose tolerant as infants. The evolutionary complexity to keep producing enzymes into adulthood is minor compared to the complexity of evolving those enzymes to begin with.