Stars originate as large bodies of slowly rotating gas. because of gravity, these clumps of gas slowly decrease in size. the angular velocity of a star increases as it shrinks because of the angular momentum conservation.
This is because in a rotary system with decreasing diameter, the angular momentum should be conserved (as long as the net torque is zero) based on physics conservation laws