What, exactly, makes them profitable in MODERN times?
Well, nothing makes it profitable to haul ore in modern times. Which is why nobody does it, not over oceanic distances. (It's only hauled a very short distance to a refinery where it ceases to be ore and becomes, say, iron.)
This is among the most interesting aspects of TOS space trade: the explicit references to ore being moved from star to star. Unless, say, the "automated ore transports" visiting the Delta Vega lithium cracking plant were moving ore from the other planets of the same system (or even from other spots on the surface of that world - perhaps they were crawlers or airships rather than spaceships?) to be refined in the lithium cracking process?
Although you could purchase commodities and raw materials from various traders, you would always be subject to their prices and their trading limitations. If you obtained these items through your own colony, then you possess them and control their availability. If you have more than you need or wish to keep in reserve, then you can trade it and make a profit.
But all the colonies are virtual Second Earths, as far as we can tell. Why would anybody buy anything from another colony? Unless it were something so exotic that only very few would even find a use for it, and then it would require quite a bit of skill to make a business case of it.
OTOH, we know from TNG that there are "agricultural worlds" or "farming planets" that supposedly exist to feed other worlds. ST2:TWoK in turn hints at interstellar problems of food shortage, and at the creation of arable land next to those in need being the solution, again suggesting that dedicated farming worlds at the other ends of trade routes are the default solution. If it's practical to haul grain (and not just seed samples for supergrain, as we could argue is the case in "Trouble with Tribbles" and "More Tribbles"), then it must be practical to haul just about anything, including pretty pebbles.