join() takes two arguments ... a separator and an array to 'join' together. In this case, the separator is ',' (enclosed within double-quotes whan passed to join()).
The reason is that IN() expects a comma-separated list of values like ...
IN('value1','value2','value3', ... ,'valueN')
... and you can see that, as a string in PHP, the values are separated by ','
Hope that helps.
Paul 🙂