Thomas assigned it to Alito, whom practically nobody regards highly as a legal thinker and who's thought of by liberals and conservatives alike as one of the most party-political justices in the Supreme Court's modern history. Why do we think this was?
Because he's thought of by liberals and conservatives as one of the most party-political justices in the Supreme Court's modern history. He's put in the work, paid his dues, and finally gets to write his opinion. Same reason Thomas got
Bruen.
(And Barrett, to my knowledge, hasn't written any of the opinions released thus far. I would ask one of the legal experts how long a new justice typically has to wait before being assigned an opinion when they're in the majority.)
Barrett has written several majority opinions in her time on the Court. New justices tend to write the same amount as old ones; anything else would put a probably unsustainable workload on the more senior justices. New justices are somewhat less likely to write the "big" cases, but, off the top of my head, Barrett has written for the majority in
Patel v. Garland (limiting federal court review in immigration cases),
Denezpi v. United States (tribal prosecutions don't count for double jeopardy), the unanimous water rights case
Florida v. Georgia, and several others.