Brokers are lending because it's more profitable than storing cash in risk-free assets. Brokers are getting a better return lending than they would parking cash in risk-free assets. Margin is accessible to longs and shorts. When you borrow long, according to FINRA Reg-T:
Regulation T gives an investor a maximum of five business days to pay for securities purchased in a cash or margin account. If payment due exceeds $1,000 and is not received by the end of this time period, the broker-dealer must either liquidate the position or apply for and receive an extension from its designated examining authority, such as FINRA
Why would some brokerage want to go through the trouble of filing extensions for every account with borrowed funds over $1,000 that hasn't paid in 5-days? The income stream. How can we tell it's the longs that are borrowing?
Via Investopedia:
When the shares are first short sold, the investor receives the cash amount of the sale in his or her margin account. This amount, plus the specified margin amount which must be deposited by the investor under Reg T, comprises the credit balance.
When people borrow short, the credit balance increases. When people borrow long, the credit balance decreases. When everyone stopped being short after the 2007 bubble, credit balances fell until the 2009 S&P 500 low.
Exhibit A
Note the ramp in Margin Credit around September 2011. What a coincidence to when the S&P 500 Price Only Index began it's 45 degree ramp to 2,000 and Investor Net Worth flipped negative.
Exhibit B
Buyers of this market are doing it with borrowed case to increase returns and brokers are willing to oblige so long as the juice (interest) is worth the squeeze (default risk)