Quote from Sparohok:
With a pass through entity that has capital gains, you can choose what you want to do with those gains. You can distribute the gains to yourself as the owner of the company, or you can pay salary to yourself as an employee of the company. The latter is generally disadvantageous since you pay SE taxes on earned income. The only reason to even consider paying youself a salary is if you need earned income for tax reasons, for example to take a health insurance deduction, or to contribute to a retirement account.