The varieties you see in a supermarket are optimized for industrial farming and yes, transportation is one of the things they optimize for. The tomato specifically, though, lost most of it's flavor purely for aesthetic reasons [1]. Consumers have an image of the perfectly round red tomato so all the farmers optimized for it, losing at least one critical gene that contributed significantly to flavor and sugar production.
Those varieties have mostly out competed everything else in farmers markets and supermarkets but if you buy seeds online from specialized stores and grow them yourself, you can unlock an entire universe of flavor. Personally, I've never found a supermarket fruit or vegetable that tastes as good as the ones I have grown or eaten in countries with less industrialized farming, with the exception of designer varieties like cotton candy grapes, cosmic crisp apples, or sumo mandarins (though their quality is rapidly falling as they go from coddled breeding labs to industrial scale). I don't think I've had a "proper" strawberry, blueberry, or raspberry since I moved to the United States.
[1] https://science.sciencemag.org/content/336/6089/1711.full