Most women would not consider such an ordinary social interaction to be harassment, but suppose a small fraction do - being perceived or accused of harassment is such a negative thing that it can be a strong deterrent even if there's a low chance of it actually happening.