If they are letting you trade with instant credit, then under the hood there ARE margin loans going on. To be compliant with SEC regulations the broker must be pulling on short term margin loans from a bank to cover the securities being bought without hard cash in hand.
No they are exposed to you as a credit risk. They trust you that you intend to transfer the money in good faith. As long as the transfer is complete at no point they make a loan to you because trade settles at T+2, i.e. cash is not required on the date of trade. It is the loaning aspect that is regulated. Free riding is forbidden by Reg-T of the FRB. Your broker's settlement risk is not considered a margin loan either. It is a credit risk that they satisfy by depositing funds with the DTCC for a tiny fraction of the notional value.
The difference between the credit risk and the margin loan is that in the vast majority (say > 99%) of times the credit risk does not become a loan. You don't need to punish all the people acting in good faith for the action of a few. The regulation on free riding comes from a money supply perspective. You are not allowed to create money without taking out a loan.