The labyrinth organ is a special breathing structure in bettas and gouramis that lets them gulp air from the surface, which is why you see them dart to the top — but it does not mean they can live in an unfiltered bowl.
Being able to breathe air helps these fish survive low-oxygen water in the wild, and it is normal to see them take an occasional gulp at the surface. It is not a sign of trouble by itself.
The myth that a betta "breathes air so it doesn't need a proper tank" is exactly backwards — it still needs warm, clean, cycled water like any other tropical fish.