You are correct that trading by itself does not reduce carbon emissions, but it does help towards minimizing the overall societal costs of meeting emission reduction targets by reducing carbon emissions where it is least expensive to do so. By minimizing costs, a government may be willing to set a more stringent cap on the overall level of carbon emissions allowed in the economy than it would be otherwise. The theory is that, without carbon trading, politicians and regulators would not be as willing to establish as aggressive of emissions reduction targets as with carbon trading because it would be too expensive.
So the idea is to reduce the overall gas emissions. Is company A is at 25% of its set quota of emissions for that year, selling its credit to others which have exceeded their quota wont do as much good as you might think,. But this is an incentive for a company to be able to reduce, in the age of raising costs most companies want to cut their operations costs to be able to show decent profits, going forward as energy becomes expensive, so will the energy offsets and this will bite into the bottom line of a company, hence the incentive to reduce emissions. I hope it made some sense.