The flour stabilizes the egg custard plus it helps absorbs any excess liquid given off by the vegetables added to the filling.