Nobody did. Because it was a lie on its face. It was a simple test. You have an unlimited number of trees that are yours.
God said, "i do not want you to be robots with no free will. this is how you can show your respect for my authority and show that you will live by my laws, this tree is mine, you can have every tree here except this one. If you eat from this one it means you do not respect me or want to live under my authority".
The tree wasnt magical, it had no special properties. It was not an allegory for sex. It was just a tree. Nobody gained "knowlege" from eating from it, they declared independance from their creator by eating from it.
Knowing good and bad simply meant "deciding for yourself what was good and bad. Making your own rules"