Why do flaps retract?
Flaps retract in order to reduce wing area. This has several advantages when flying fast:


The higher wing loading (weight per lift-producing area) reduces gust loads. When hit by a vertical gust, the angle of attack increases suddenly, and so does lift. If this happens at high speed (more precisely: At high dynamic pressure), the lift increase might overstress the wing. A reduced area will only produce so much extra lift before the wing stalls, which limits the extra lift from gusts.
Less exposed area also means less friction drag. Your flexible flap proposal would still leave both sides of the flap exposed, adding more surface for friction drag. Put another way, the higher wing loading shifts the lift coefficient up which generally improves L/D at high speed.
Retraction closes the gaps between wing and flap sections. While those gaps are important to maximize the lift coefficient for the lowest possible landing speed, they increase drag at all lift coefficients.


The retraction mechanism is heavy and increases maintenance cost, but it is worth it.