You can think of closing the channel as sending a message “there will be no further messages”, the panic on write is enforcement of that contract.
Additionally the safe way to use closing of a channel is the writer closing it.
If you have multiple writers, you have to either synchronise them, or don’t close the channel.