Prevention of hematoma (as we say in the colonies) is by causing hemostasis within the vessel (here, a vein). Careful pressure during withdrawal, followed by firm pressure after withdrawal until primary hemostasis is achieved reduces the rate of hematoma formation.
Thorough mechanistic studies being absent, we can still confidently make some statements about what is likely happening, based on our knowledge of physics and hematology.
Why is it not necessary until withdrawal?
Good venipuncture technique results in a single puncture of a vein that is no larger than the needle. With a single puncture, during the blood draw, all blood exiting the vessel enters the needle and the collection tube. This is why pressure is not necessary until withdrawal of the needle. In fact, pressure at this point may cause the needle to damage the vessel at another site, allowing blood to exit into the tissue.
How does pressure prevent a hematoma?
On withdrawal, external pressure to a punctured vessel that is greater than the internal pressure of that vessel will stop the flow of blood, preventing blood from entering the tissue. At a standard venipuncture site, e.g., the antecubital vein, it takes approximately 2-10 minutes for primary hemostasis (in the absence of aspirin, or otherwise poisoned or disordered platelets). If you prevent flow out of the vessel during this period, you'll prevent formation of a hematoma. There are other mechanisms at work here that help, e.g., vasospasm, so you may still avoid a hematoma without pressure, but the rate of hematoma formation is higher when this isn't done
Does it increase vein inner wall cell damage, releasing agents triggering faster clotting?
Possibly, but the primary mechanism is simple physics. Increase the pressure until a plug is formed, and you prevent blood from exiting the vessel into the tissues.