According to the scientific definition of fruit, peas are indeed a fruit, since they are the seed-bearing structure that develops from the pea flower. However, in common language and in gardening, we usually follow the culinary definition of fruits and vegetables, which is that vegetables are savory and fruits are sweet. Of course, this is not always true—just eat a sugar snap pea—but this is the way that most vegetables and fruit are organized. This is why tomatoes, cucumbers, and pumpkins are also called vegetables despite technically being fruits!
So, long story short: Peas are both fruits and vegetables, depending on which definitions you follow!
According to the scientific definition of fruit, peas are indeed a fruit, since they are the seed-bearing structure that develops from the pea flower. However, in common language and in gardening, we usually follow the culinary definition of fruits and vegetables, which is that vegetables are savory and fruits are sweet. Of course, this is not always true—just eat a sugar snap pea—but this is the way that most vegetables and fruit are organized. This is why tomatoes, cucumbers, and pumpkins are also called vegetables despite technically being fruits!
So, long story short: Peas are both fruits and vegetables, depending on which definitions you follow!