When I taught high school I always had assigned seats. I started the year off with them being alphabetical, with maybe a bit of tweaking to keep the tables gender even (I taught foods classes as a FCS teacher and the students sat 6 to a table and the 6 people all worked in one kitchen on food lab days and I tried to avoid groups with 5 of one gender and 1 of one). Then as the year went on I switched seats based on who was able to work best with who. A lot of the students didn't like it and would try to sit with whoever they wanted but I consistently made them move back to their assigned seats. Keeping chatting to a minimum with a table situation and 30 students was hard enough without the students choosing to sit with friends.