I'm not an expert on jet engines but my own thinking is this:
The fuel being burned in the engine's combustion chamber is being carefully mixed with a given ratio of air, one which provides the maximum amount of thrust per a given amount of fuel burned. Some of the calculation behind that maximum amount of thrust concerns purposely including incompletely-burned fuel material - it's mass is greater than the mass of the heated air it would have produced had it been completely burned, hence it provides more thrust. Essentially this would be an over-rich mixture.
When fuel is injected into the afterburner of a so-equipped engine, that fuel is more completely burned because it has a greater amount of oxygen molecules available to it than that which is burned in the combustion chamber. Afterburners are pretty much just a fuel ring squirting raw fuel into an already-burning mass of air. That ring is in such a location that the burning fuel can obtain oxygen not from just the engine inlet, but also from areas surrounding the engine itself. Nacelle / fuselage design is such that this oxygen feeds into the afterburner area to give a more lean mixture than is obtained in the combustion chamber itself, thereby burning the fuel more completely.
That, in itself, leaves less unburned matter to show up as a smoke trail.
"There may be old pilots, and there may be bold pilots, but there are darn few green cows"