Initially it was behind a consent form for research purposes. i.e. Just give some basic deets and you get access to the weights under a non-commercial license. FB shut that down after it got lots of attention.
That obvious got copy pasted onto a torrent & grew legs from there. And FB hassled some people DCMA takedowns too but seemed pretty half hearted & was too late at that stage.
[Sidequest: I believe the repo they used to distribute access also had a magnetic link in it too at one point which further confused the narrative but not 100% sure on the precise details on this]
Point is at no stage was this 100% behind closed doors and someone leaked it as you & I would understand the word in the "stolen" sense.
They wanted to distribute it. But they couldn't, politically. So it "leaked."
Perhaps you meant that they were nervous about companies using it commercially and either bringing them bad press or making money off their work? That's clearly why they only released it for researchers.
No legal issues per se. Hence the political qualifier. See: https://www.menendez.senate.gov/imo/media/doc/letter_to_meta...
Zuckerberg said it was during his Lex Fridman interview.