Why do crane flies have such long legs?

I’ve seen this a few times and wondered about purpose.

According to Reddit posts the action denotes a female releasing pheromones.

Video here for anyone who hasn’t encountered this :

https://www.reddit.com/r/Entomology/comments/fvfmlo/why_is_this_fly_shaking_genuinely_curious_thank/