Airlines typically have a "good" contract for fuel with some supplier for their base airports (they buy a LOT of fuel and hence, they are able to negotiate higher discount). When a plane flies to a small(er) airport (e.g. where the airline goes 2-3 times a week), there they won't have a discount, so they would have to pay more. Therefore, it might be a case that it is more efficient (or profitable) to take on board more fuel (even if it means that the plane will burn more fuel) than to buy fuel for a higher price, i.e. they might prefer to burn more of cheaper fuel than burn less but of more expensive one. I am talking about the case of domestic flights: the base price of fuel might vary quite a bit (you can easily google fuel prices for different airports in various countries). So if it is a case for domestic flight, a similar observation could possibly occur for international flights.
In general, airlines do not produce a lot of economic profit. That is why, in order to maximize their profits, airlines do everything they can (one of these actions is fuel-tankering). They of course do not take into account the negative externality they create by burning more fuel (the extra social cost). So that they end up providing access amount of the activity (more than social optimum).
They could stop doing so but their profits (if occurring) would be lower. Next question could be - whether passengers would like to pay more so that airlines stop doing it? You can probably guess the answer to that.
Oh and in the second link provided by @E.Sommer, this, you have someone who actually has some real world experience on that matter:
"I only saw this happen operationally when we were going to be very light and the outstation fuel was very expensive. Usually our loads were high enough that we were struggling to get all 50 passengers, bags, and especially jumpseaters on board with the required fuel load. In that case it would not be economical to take more fuel because we'd have to take fewer passengers." ~ @casey