Oh those are easy. In the beginning, probably early humans sampled everything, including tree bark, to see what was good and what killed you. The discovery of fermentation was probably a complete accident.They're actually a pretty big part of other countries' cuisines. I've heard that they can be pretty tasty, though I'm not that interested in trying them.
Besides, as far as what humans have eaten, bugs are hardly the weirdest. Whose idea was it to peel literal bark off of a tree and eat it? Not to mention fermentation, which is basically growing non-deadly bacteria and organisms in food and drink.
The one that really gets me is how did humans figure out that if you get the sap from one specific type of tree and boil it for a long long time it turns into syrup?