Iirc, they do a straw poll avter oral arguments to see what the majority is and most senior assigns. The writing is generally spread equally across justices over a term. It is a workload thing