The reason it makes a user part all channels is because, once upon a time, IRC used numbers instead of channel names (e.g., #stuff).

Since the comma works as a delimiter, the person really is joining the channel #3, then joining 0. Back when the channels were numbers, 0 was the equivalent of not being on any channels. So, when you join 0, you part all.

I first saw this used as someone saying to "Join #2,000" so, #3,0 is not the only way this can be done.