the serpent character is tragically underdeveloped in this story, like, what is his game? He doesn't benefit in any way, perhaps he just saw how god was fucking humanity over and wanted to free them.
Also notice God just showed up immediately after they ate the fruit and were still processing all that knowledge of good and evil which must have been trippy as fuck... had god not showed up they would have realized "oh shit we better eat of the tree of life next so we can become gods ourselves" but God took decisive action to prevent this from happening.