Well fruits come from flowers (they blossom/bloom before bearing fruit to be picked), and have some for of seed/pit (hence why tomatoes and avocados are fruits). In nature, plants create fruits as something for animals to eat, and when animals eat those fruits, the seeds and pits from the fruits are spread across the land, thus allowing fruit bearing plants to reproduce. Vegetables on the other hand are just a part of a plant, generally it's just a result of budding (as is the case with lettuce), or a root (like a carrot or potato), or just a part of a plant that stores energy (like peas).
So to conclude, lettuce is considered a vegetable because a) it bears no seeds or pit, b) it's not a result of a blooming flower, and c) it's the result of budding.