Technically illegal, I think
The developer programme licence limits devices that may be added to your account to those that are actually used for development. The iOS beta is then distributed under a non-disclosure agreement that limits its use to that same class of devices.
That, plus active enforcement, sounds like enough to establish that Apple intend the betas to be trade secrets.
So developers that breach their contracts with Apple are conveying trade secrets without authorisation and those that buy into this sort of scheme are buying trade secrets.
That being said, supposing Apple stop at just having the sites taken down I think they're acting proportionately.