Why this flaming sword?

Alma 42:3-4

Now, we see that the man had become as God, knowing good and evil; and lest he should put forth his hand, and take also of the tree of life, and eat and live forever, the Lord God placed cherubim and the flaming sword, that he should not partake of the fruit—

And thus we see, that there was a time granted unto man to repent, yea, a probationary time, a time to repent and serve God.

Alma 42:8-10

Now behold, it was not expedient that man should be reclaimed from this temporal death, for that would destroy the great plan of happiness.

Therefore, as the soul could never die, and the fall had brought upon all mankind a spiritual death as well as a temporal, that is, they were cut off from the presence of the Lord, it was expedient that mankind should be reclaimed from this spiritual death.

Therefore, as they had become carnal, sensual, and devilish, by nature, this probationary state became a state for them to prepare; it became a preparatory state.