You'd be surprised how much of what we eat is stuff we created through cross-breeding. You think pre-modern humans had broccoli? Or granny smith apples? Or corn? Nope. Nothing like any of those things existed until humans made them by selectively breeding things.
Citrus fruits are no exception. Sure, we made lemons (and oranges and pomelos and bergamots etc) from some wild ancestor of modern citrus fruits. But I'm fairly sure it's us humans who crossed and selectively bred plants for sourness to get lemons.
Similarly to how we've selectively bred for spiciness to get things like carolina reapers and such.
We humans are weird about liking to eat unpleasant stuff.