One of the primary reasons as to why this is advised is because of the manner in which the vaccines are injected, i.e. through an intramuscular route. With intramuscular vaccines (most of the COVID-19 vaccine shots are delivered through this mean right now), rubbing, pinching or massaging the injection site may interfere with the effectiveness of the vaccine. While it may seem to relieve and quench the soreness that follows inoculation, massaging at the point may seldom cause the drug to back up through the subcutaneous tissue present in the deepest layer of your skin, so, as a safety measure, massages or hard rubs are best avoided for the time being. Some also suggest that the vaccines are very delicately pressed into the arm, so such an action could lead to undesirable effects as well.
Vaccinators also suggest that rubbing or massaging should be avoided immediately after, or hours after vaccination, when it is expected that the vaccine drug reaches its peak levels and thus avoid counter absorption.