The flapjack was cut before the sugar had set
Very commonThe syrup that binds a flapjack is liquid at baking temperature and rigid at room temperature — the set happens entirely during cooling, not in the oven. Cut while hot, the oats simply move apart, because the thing that was going to hold them has not hardened yet. It is the commonest reason a correctly made flapjack crumbles, and it is entirely a matter of patience rather than of recipe.
What to change
Let it cool completely in the tin before cutting
Score the portions while it is still warm if clean edges matter, but leave the tray to cool completely — ideally for a couple of hours — before cutting through and lifting anything out. If it must be hurried, the fridge will set it faster than the worktop.
Flapjacks, caramel shortbread, fudge-topped traybakes and anything set by sugar.
Trade-off: Patience, and the loss of a warm flapjack straight from the tin.