They work like a weather VANE (not vein), they are allowed to spin so the counterweights face the wind (boom trailing).
It would be very stressful to try and resist the wind loads if you think about it, a several hundred foot boom can catch alot of wind.
While working, if a storm brews up and the ground crew has to quit, the crane operator will set the crane in the weather vane mode an ride out the storm. They are safer in the crane than trying to climb down, several cranes have been struck by lightning with the operator inside, no harm done.