The purpose of alveoli is to allow fast and efficient gas exchange between the blood and the lungs.
Alveoli are very tiny in size. This increases their surface area for gas exchange. So more amount of gases can be exchanged in a given amount of time.
They are extensively surrounded by blood vessels(as you can see below). This means more air can be exchanged in a given amount of time.
- Their walls are just one cell thick. This allows the gases to rapidly move through the walls. Either to go into the blood from the lungs or the other way around.