The main function of fruits is that they protect the seeds during development. Since they are often colourful and emanate a delectable odour, they help in attracting birds and other animals to eat seeds. This way the seeds get dispersed to other areas for generating new plants.