Why does dipole must lie parallel to a rotation symmetry axis?
No, it would not

A dipole means that there is a difference (in charge) from one "side" to another "side".

If we have determined that something is symmetric, it means the "sides" are equal to each other — and that as you rotate $\left(\frac{1}{n}\right)$ around the symmetry axis, everything stays the same. If there is anything that shifts out of position, that symmetry is not there (it is broken).

Now, your image is a bit hard for me to read, is it supposed to be linear or is it on purpose not? I am going to assume it is not linear, but that the light grey are symmetrically placed… So in your image, there is only a $C_2$ rotational axis, in the approximate "up/down" direction. By placing a fluorine in one end  (and something else at the other end) you would destroy the $C_2$ symmetry. If you rotate it $180$ degrees around (if you could see it through the backside of your monitor…) the fluorine would be on the other side, clearly not identical to $E$, the original. No symmetry.

If it was linear, the light grey and dark gray arranged as a line, then it would still retain a $C_\infty$ rotational axis along the dark grey atoms. Rotating around this in any fraction or direction would still keep everything looking the same.