Why was the oven invented?

The oven was invented to bake containers and bread as these things would help food last much longer, making it possible to settle rather than maintain a nomadic lifestyle.