It's not, in fact, the only way. The alternatives are time and/or money. Not having access to the resources needed to accomplish something is not a license to resort to socially unacceptable means.
Now, there's an argument to be made that actors who accepted to work under Kubrick knew (or at least ought to have known) what they were getting into, which blurs things a lot in this specific case. But "It's the only way" is going too far imo.
Its going too far if industry is replete with Kubrick level work with above reproach behavior. Else I can just choose to not watch Kubrick films while stewing in my own moral superiority.
Now, there's an argument to be made that actors who accepted to work under Kubrick knew (or at least ought to have known) what they were getting into, which blurs things a lot in this specific case. But "It's the only way" is going too far imo.