I think not all farming does that. In fact, our world has produced fruits and vegetables from a long time ago.
The way in which this agriculture is done is what affects the environment. I saw a documentary about this topic, and it is worth watching
The trailer: