The reason why it is gambling is that the participant pays a joining fee or pays the price of the product in the hope of being able to attract customers and get commission, which may or may not happen, hence this is gambling.
With regard to permissible brokerage or agency services, that does not involve stipulating a condition that a joining fee must be paid or an item must be purchased before agreeing to act as a broker or agent.