The all-purpose flour is mixed with the jelly to thicken it. This prevents the jelly from leaking out during the baking process.