That picture shows an air conditioner which only takes air from the inside (red indoor air arrow) and cools it before pushing it back into the room. It only uses air from outside to cool the outside condenser coils. Since you are moving heat from inside the room to outside - the outside coils will get hot and so you have to cool them.
The only thing that flows between inside and outside in this diagram is the hot fluid in these coils. You could cool the outside condensor coils by having them go into the ground or a river - anything that can absorb the heat. This is actually more efficient than using air, but most houses don't have a river flowing past the window!
In reality an air conditioner like this will leave the air inside the room cooler, but stale and smelly, since it is continually reused. A real air conditioner also takes a proportion of fresh air from the outside and cools that before adding it to the inside air. Better models also have a heat exchanger so the cold stale air being sent outside will cool the fresh warm air on it's way in.