A large part of taste is expectation. Things that you think will taste of one thing but instead taste of something else usually cause an adverse reaction. For example this video of a blindfolded milk test with one of the “milks” being orange juice. It’s not that orange juice is disgusting in itself, but if you’re expecting milk it is.
When you think of what foods are considered an “acquired taste” most of them have a pretty unique flavour. I think beer is probably the best example of an acquired taste, since most people like it, but basically no one likes it when they first try it. Beer has a taste that’s completely different and unexpected compared to other beverages, so your first reaction is unpleasant. I’m sure one could come up with a bunch of evolutionary reasons why things that taste weird cause an unpleasant reaction. But essentially you need to get used to a taste before your expectations align with reality, and only after can you really enjoy the flavour.
Human evolution explains the distaste for alcohol at first. We are incredible at identifying poisons. Poisons have a severe bitter taste which is why when poisoning someone, say someone putting antifreeze in their spouse’s drink, they have to mask it with an overwhelming amount of sugar.
Another aspect is the impact of culture. People will limit their dietary choices, consciously or not, due to their upbringing. Likewise, some cultures will expose us to things we would not in others. Haggis, vegemite/marmite, Durian, root beer… Religion, societal/class norms, etc. play a role in learned dislikes. A similar process happens, as you become accustomed to the food and get over the mental barrier which prevents you from enjoying it.
Lastly, sometimes we don’t get a choice. Starving? Not where you’ve missed a meal but actual food deprivation. When you’re hungry, anything tastes good…