I reject all this good/bad, sin/moral shit coming from some sort of omniscient all powerful "god." It's just pointless wondering, and the Bible is no help, it's hopelessly antiquated.
But if you understand the social milieu of the day, like I have striven to do, you can parse this:
Insane Mystic said:
To go with the Biblical metaphor (not that I haven't left Abrahamitic monotheism far behind by now, myself ) - where the fuck did that damn snake come from, if not as a creature YHWH made? How is there a "force of evil" in a paradise, before the Fall From Grace? And if one goes with the "oh it's when Lucifer rebelled and Old Mike struck him down out of Heaven, Lucifer was the snake in disguise"... yeah fine... but... seriously. It shifts that question back in the timeline, but it's still the same question. Why did YHWH create an angel - an entity of light and goodness, made for literally nothing else than to serve his divine Lord, whom he knew, first hand, was glorious, and good, and most of all, tangibly real - that was even capable of rebellion? I don't see it add up, unless YWHW by design set someone up to fail, either the snake/Lucifer or Adam and Eve.
First of all although "Lucifer" the light bringer was conflated with some kind of cosmic evil long ago, we don't need to do so.
Just read the Bible IN CONTEXT, instead of taking for granted that the "final verdict" is the correct one, while complaining it makes no sense for you.
It doesn't make sense because it is pre-scientific mythology.
The snake, as I hinted upthread, would have been know to ALL humans of the region at the time (600BCE and earlier) as a GODDESS symbol. The serpent was associated with several goddess figures. In that region, it was Asherah. The Gan Eden story is yet one more tale about the competition of Yahweh and Asherah worshipers. Most of the Old Testament is about a transfer of power from women to men, writ large as gods.
So, Asherah was recommending knowledge, female wisdom. Yahweh instead was forcing a different more obedient attitude. He says, in the story, if the humans eat of that tree "they will become like us," ie, more godlike. There was a pantheon of gods in those days, which is reflected in the 10 commandments, no other gods before me, Yahweh, for the Israelites. Asherah was a hugely popular god, and people were loathe to give her up.
Next point:
Lucifer (Latin for light bringer) was an epithet for a Babylonian ruler. An actual guy, not a god. Sure, he thought he was a god, or wanted people to think he was one, there was no separation of religion and state back then. Read Isaiah 14, read THE CONTEXT of his mention! He was known as the son of "Dawn," who was a female deity of the time.
https://www.biblegateway.com/passage/?search=Isaiah 14&version=ESV
Later religionists conflated the serpent (symbol of Asherah), Lucifer (a Babylonian king claiming divinity), Baal Zebul (aka Beelzebub) the god of Akron, along with the Persian god Angra Mainyu they came into awareness of after Persia conquered Babylon and let the Judahite rulers out of captivity, as well as, finally, with Yahweh's helper entity the "shaytan," to come up with an evil enemy who is the opposite of the "good god" Yahweh. But originally they were all separate entities in a pantheon of several different empires.