It's an assumption that the whole of humanity would live forever. The only people in the garden at the time are Adam and Eve and the only reference God makes is that they would live forever. I'd like to set this issue aside as it's not, IMO, relevant to the question.
Before the Fall of Adam and Eve, they were already eternal. They were physically perfect and sinless but, by implication of the Father's statement, ignorant and naive. At that time they could eat of the Tree of Life all they wanted and nothing would change.
Once Adam and Eve tasted of the Tree of Knowledge of Good and Evil, three things happened. (a) Physically they began to decay. (b) Spiritually they had broken a law. (c) And mentally they became aware of what we today might call the "vagaries of life." They knew before tasting that fruit that it was contrary to God's command to eat it. But they didn't understand why or what the consequences would be until after tasting the fruit.
And here's the rub: Finally knowing both what they did and why it was wrong, they had need to repent. No unclean person, no unrepentant person, no unsaved person, can enter into the Father's kingdom — and that's part of what it means to enjoy eternal life. Had the Father allowed Adam and Eve to eat from the Tree of Life before they'd had a chance to repent, a paradox (another kind of "breaking the law") would happen.
What's the paradox?
The ability to live eternally without the atoning sacrifice and resurrection of Jesus Christ. From a mortal, imperfect perspective, it would be cheating. In a sense, eating from the Tree of Life after the Fall without the benefit of repentance and the Atonement of Jesus Christ would break another law.
Whether you believe the Garden story to be literal or not, the purpose of God must move forward and paradoxes must be avoided. In a parabolic sense, the Tree of Life represents the ability to maintain or regain perfection — to restore ourselves (or, to restore Adam and Eve) to the kingdom of our Father. The scriptures teach that God is the same yesterday, today, and forever, meaning that physical process must exist both before and after the fall — and the Tree of Life represents that physical process.
But once Adam and Eve fell, they no longer had the right to avail themselves of that process before repentance, which required more than just saying they were sorry. (And that's a much longer discussion!)