The other option would have been to sell the Alibaba shares and give the proceeds to shareholders but in that case, they'd have to pay 35% in taxes.
Distributing the Alibaba shares directly to the Yahoo! shareholders would result in them owning Alibaba shares directly.
If they gave out the shares then most shareholders would likely just resell them onto the open market.
However with the spin-off now they have a great little power house to direct and influence Alibaba.
The other option would have been to sell the Alibaba shares and give the proceeds to shareholders but in that case, they'd have to pay 35% in taxes.