How teams are made
The list is shuffled with the Fisher–Yates algorithm, then players are dealt round-robin like cards. With 10 players and 3 teams you get sizes 4, 3 and 3.
How the randomness works
Every result comes from your browser’s cryptographic random number generator (crypto.getRandomValues), the same source used for encryption keys. To turn random bits into a number in a range without bias, values that would make some outcomes slightly more likely are thrown away and redrawn (rejection sampling). Nothing is sent to a server.