That's a good question, SB...and the answer is sorta simple, and sorta not. There's several factors that may affect how well a paint film touches up - even with the same paint....
Of course, the paint is but one of these factors...Typically, the flatter a finish, the better it will touch-up. A sheened product (eggshell, satin, semi-gloss, etc.) will show areas that have been touched up far more than dead flat finishes. That's not to say an eggshell, or low luster, sheen can't be touched up, but in many cases it may take several days, to several weeks, for the sheen of each application to tone down enough to not be noticed. So, let's say you applied a flat and it still doesn't touch-up...It is very possible that is due to your flat is not really a flat. Many higher quality "flat" paints still have a degree of sheen (typically called "angular sheen") that makes touch-up not quite invisible. These products may be called, within the industry, as "high sheen flats" but still fall within the range of what some would categorize as flat wall paints (0-8 degrees). The reason for the sheen is to provide better washability, stain-resistance and overall film integrity...
But let's say that's not it either - that your paint is simply a mid-grade "dead flat" (sheen level <5). Touch-up should be completely invisible, but it's not. That may, and most probably, has to do with the film build applied overall to the affected area. Let's say you painted a ceiling with 1 coat of a dead flat ceiling paint - then realized you had to repair a damaged surface with spackle, primer and 1 or 2 coats of finish. For this area, the substrate is not the same as what was originally painted (orange-peel textured drywall), as you're now painting over a smooth spackle. Then you apply 1 coat of primer that has to cover the spackle, but also overlap the existing paint from the non-damaged area - now you have a film build difference. Then you apply 1 or 2 coats of the finish paint to the applied primer and create even a greater film build disparity. Since you always view a ceiling at the worst possible angle (parallax), you'll often see the "outline" of the touch up as what you're viewing is, at least, 2 different angles (or facets). If you were to stand directly beneath the touched up area, chances are it would be invisible - but stepping back and viewing it at a parallax, you see the light reflected from the different facets that "appear" as a different color (often times appearing as a "ring" around the touched up spot. As you roll over the area, you will tend to apply the product heavier over the repaired area then "feather" out the edges over the existing paint - and that helps - but due to the film build differences, this "feathering" creates a beveled surface leading up to the heaviest build where the damage occurred.
To successfully touch up in the scenario above, you need to recreate the texture of the area surrounding the repaired area...there are a couple of aerosols "Orange Peel Textures" you can spray on the surface (that in some cases will eliminate the need for a separate primer), then paint over with the original paint to blend in...but the trick here is to not create a noticeable film build difference between the existing paint and the newly applied. To minimize the film build differences (especially if you are working with a high build flat to begin with), is to thin your paint - with water. By thinning with water, you will be applying much less of a film build to the surface, and eliminating the build differences between the 2 apps (It is true that by thinning the product, you may not be able to re-create the texture of the originally applied product, but that's the reason for the spray on "Orange Peel")...
There are other factors that affect how well a coating will touch-up - technique, experience, tools, wall and ambient temperatures at time of application and touch-up, date original product was actually applied versus that of the date of touch-up, etc. When you consider all the factors to a successful touch-up, it kinda makes you appreciate the value of a qualified and experienced painter. I hope some of this info makes sense. Good luck.