To be fair, it uses MCTS, which requires many simulations of the game. For this, it needs to know which moves are valid, and when a player wins or loses the game.
So it does need to know the rules of the game, but it doesn't need any prior knowledge about which moves are better than others.