It is perfectly legal: there is no law restricting a business from asking its independent contractors what they make from their other clients. They can't compel you to answer it, but they can certain draw their own conclusions from silence.