Can I replace "just" to "for no reason"? Like, "You can't take anyone for no reason."
Native speaker’s answer
Rebecca
This is a good guess. However, the point of emphasis here is not on "just," but on the "taking of someone" to the event. Hermione is saying that Harry has to take (bring) someone appropriate/suitable, not that he can't take someone for no reason. Thus, "just" cannot be replaced with "for no reason" as this would change the meaning of the sentence.