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.