He was there to protect the way to the tree of life.
The garden is paradise. Life and fruit come from God. One human showed us the way that's guarded.
Isa 51:
1Listen to Me, you who pursue righteousness,
you who seek the LORD:
Look to the rock from which you were cut,
and to the quarry from which you were hewn.
2Look to Abraham your father,
and to Sarah who bore you.
When I called him, he was but one;
then I blessed him and multiplied him.
3For the LORD will comfort Zion
and look with compassion on all her ruins;
He will make her wilderness like Eden
and her desert like the garden of the LORD.
Joy and gladness will be found in her,
thanksgiving and melodious song.
4Pay attention to Me, My people,
and listen to Me, My nation;
for a law will go out from Me,
and My justice will become a light to the nations;
I will bring it about quickly.
.....
16I have put My words in your mouth,
and covered you in the shadow of My hand,
to establish
a the heavens, to found the earth,
and to say to Zion, “You are My people.”
This is very telling. God compares righteousness to the garden of Eden because He puts His law in the hearts of the righteous.