It's not just unethical, it's most likely in breach of the employment contract he signed for his internship and he would have definitely lost in court.
That guy didn't get bullied by the CEO, the CEO got bullied by HackerNews.
You mentioned an employment contract which is very open and shut. It's a very simplifying argument which unfortunately isn't mentioned by anyone else involved and such a clause wouldn't even be legal in California where Replit is based.
A logical conclusion is that the breach doesn't exist and arguments that rest on it are unfounded