The reason the deposits are necessary is that there is no inherent trust between the firms on settlement day. The deposits are the Brokers saying, "Hey, trust me, I've got everything I need to complete the settlement, here's my collateral".
As such, if a Broker doesn't have the funds to complete the transaction, you can pull it from their deposits.
Your money doesn't really play a part in this, and indeed the illusion of "give $X for Y stock" is just an illusion.
So if I tell a broker to buy $X worth of some stock for me, is what actually happens that the broker buys $X worth of that stock using their money, and then when that has completed a couple days later the broker takes $X from my cash account and transfers the stock to me?
No, when you tell a broker to buy $X of stock, they send a record of that purchase to a clearing firm. The clearing firm, in order to make sure none of the Brokers becomes insolvent before settlement, requires every Broker offer up collateral - it's collateral, it's not spent if everything goes well.
It's the SEC requiring brokers offer up insurance in case they explode.
Then, 2 days later, your actual money goes to the clearing firm and is exchanged for stock.
And this is why it’s confusing to the unsophisticated investor. Why didn’t they send my money in the first place? They can call it 100% collateral if they really want, but it’s basically payment up front. Once they get the stock I asked for, they take the money.
I suspect there are a lot more complicated trading mechanisms that take advantage of that 2 day gap that make my plan unfeasible though.
As such, if a Broker doesn't have the funds to complete the transaction, you can pull it from their deposits.
Your money doesn't really play a part in this, and indeed the illusion of "give $X for Y stock" is just an illusion.