As in any section there are tension fibres above the neutral axis and compression fibres below the neutral axis. This then forms the couple to resist bending. A beam doesn't have to have flanges to have stiffness, however it is more efficient to have as much material as far from the neutral axis as possible to resist the moment and to make the best use of the materials.