They weren't banned. The regulations on shape and size of certain fruits and vegetables were for ensuring quality and consistency in long-distance transport. A long, straight banana is less likely to be damaged in transport compared to a highly curved one or a fat and short one, so any banana that is transported for sale into or across the single market has to conform to certain shape and size requirements. If they're sold locally - i.e. not long-distance - different, far less-stringent quality requirements apply. Obviously there aren't many places within the EU growing bananas, so the non-comforming bananas don't put in much of an appearance, but there are lots that sell cucumber, which is the other "bendy ban". Their conformant cucumbers are sent off to other parts of the EU for sale, whilst the non-conformant (and frankly better-tasting) ones are sold locally.
Also worth noting that these are an EU implementation of an ISO regulation. A lot of the regulations the EU imposes are negotiated at the international level, in fora that require absolute unanimity rather than majority votes. The EU has an enormous voting bloc there due to all of its member states being required to adopt EU common positions, so it can effectively control and veto regulations as it desires, whilst its members can't attempt to tailor them to their local requirements, and are required to adopt them on a timetable the EU defines and in the way the EU considers "correct", rather than on their own timetable and i a way that accounts for their own cultural and economic needs.