Didn't your father teach you about "Stop orders"
You can't have your algorithm cranking away without supervision. And to be extra sure, lots of testing and LIMITS.
Limit the amount and value of orders.
With stocks, worst case: you lose the face value of stocks in your portfolio
Derivatives: you can lose more, even 'infinite liability' (still, it's constrained by the stock market inertia)
So I guess they have a role in limiting losses (which had they not been there would be much bigger)