What stops me from writing a check to myself and cashing it?
b) the bank has a big database and a system of clearing cheques that ensures you cannot double-spend money by writing yourself a cheque. If you try to kite cheques by abusing the latency in the system they notice because it turns out you can just write that down in a central database too and it's pretty effective
What happened was that person lost the ability to deposit and withdraw.
There is a level of trust but things will catch up to you.